@tugkanpilka/calendar 1.0.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.
Files changed (59) hide show
  1. package/LICENSE +22 -0
  2. package/README.md +310 -0
  3. package/dist/components/Calendar/Calendar.d.ts +12 -0
  4. package/dist/components/Calendar/Calendar.d.ts.map +1 -0
  5. package/dist/components/Calendar/Calendar.types.d.ts +33 -0
  6. package/dist/components/Calendar/Calendar.types.d.ts.map +1 -0
  7. package/dist/components/Day/Day.d.ts +7 -0
  8. package/dist/components/Day/Day.d.ts.map +1 -0
  9. package/dist/components/Day/Day.types.d.ts +40 -0
  10. package/dist/components/Day/Day.types.d.ts.map +1 -0
  11. package/dist/components/MonthHeader/MonthHeader.d.ts +12 -0
  12. package/dist/components/MonthHeader/MonthHeader.d.ts.map +1 -0
  13. package/dist/components/MonthHeader/MonthHeader.types.d.ts +33 -0
  14. package/dist/components/MonthHeader/MonthHeader.types.d.ts.map +1 -0
  15. package/dist/components/MonthList/MonthList.d.ts +12 -0
  16. package/dist/components/MonthList/MonthList.d.ts.map +1 -0
  17. package/dist/components/MonthList/MonthList.types.d.ts +31 -0
  18. package/dist/components/MonthList/MonthList.types.d.ts.map +1 -0
  19. package/dist/components/Week/Week.d.ts +12 -0
  20. package/dist/components/Week/Week.d.ts.map +1 -0
  21. package/dist/components/Week/Week.types.d.ts +35 -0
  22. package/dist/components/Week/Week.types.d.ts.map +1 -0
  23. package/dist/components/WeekdayHeader/WeekdayHeader.d.ts +16 -0
  24. package/dist/components/WeekdayHeader/WeekdayHeader.d.ts.map +1 -0
  25. package/dist/components/WeekdayHeader/WeekdayHeader.types.d.ts +16 -0
  26. package/dist/components/WeekdayHeader/WeekdayHeader.types.d.ts.map +1 -0
  27. package/dist/core/date/date-formatters.d.ts +65 -0
  28. package/dist/core/date/date-formatters.d.ts.map +1 -0
  29. package/dist/core/date/index.d.ts +6 -0
  30. package/dist/core/date/index.d.ts.map +1 -0
  31. package/dist/core/date/scroll-utils.d.ts +48 -0
  32. package/dist/core/date/scroll-utils.d.ts.map +1 -0
  33. package/dist/core/grid/calendar-grid.d.ts +45 -0
  34. package/dist/core/grid/calendar-grid.d.ts.map +1 -0
  35. package/dist/core/grid/index.d.ts +6 -0
  36. package/dist/core/grid/index.d.ts.map +1 -0
  37. package/dist/core/grid/virtualization.d.ts +38 -0
  38. package/dist/core/grid/virtualization.d.ts.map +1 -0
  39. package/dist/core/index.d.ts +7 -0
  40. package/dist/core/index.d.ts.map +1 -0
  41. package/dist/core/types.d.ts +70 -0
  42. package/dist/core/types.d.ts.map +1 -0
  43. package/dist/hooks/index.d.ts +10 -0
  44. package/dist/hooks/index.d.ts.map +1 -0
  45. package/dist/hooks/useCalendarItems.d.ts +64 -0
  46. package/dist/hooks/useCalendarItems.d.ts.map +1 -0
  47. package/dist/hooks/useInfiniteScroll.d.ts +21 -0
  48. package/dist/hooks/useInfiniteScroll.d.ts.map +1 -0
  49. package/dist/hooks/useScrollToDate.d.ts +25 -0
  50. package/dist/hooks/useScrollToDate.d.ts.map +1 -0
  51. package/dist/index.d.ts +22 -0
  52. package/dist/index.d.ts.map +1 -0
  53. package/dist/index.esm.js +667 -0
  54. package/dist/index.esm.js.map +1 -0
  55. package/dist/index.js +701 -0
  56. package/dist/index.js.map +1 -0
  57. package/dist/types/index.d.ts +14 -0
  58. package/dist/types/index.d.ts.map +1 -0
  59. package/package.json +64 -0
package/LICENSE ADDED
@@ -0,0 +1,22 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2025 Docbook
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
22
+
package/README.md ADDED
@@ -0,0 +1,310 @@
1
+ # @docbook/calendar
2
+
3
+ A highly modular, infinite scrolling calendar component built with React and TypeScript. Follows SOLID principles and is designed to be published as an NPM package.
4
+
5
+ ## Features
6
+
7
+ - **Infinite Scrolling**: Built-in support for infinite scrolling with IntersectionObserver
8
+ - **Render Props**: Maximum customization through render props pattern
9
+ - **Theme Support**: CSS variables for easy theming
10
+ - **TypeScript**: Fully typed with comprehensive type definitions
11
+ - **Performance**: Optimized with React.memo and efficient rendering
12
+ - **Modular**: Clean architecture with separated concerns
13
+ - **Zero Dependencies**: No internal component dependencies, pure React
14
+
15
+ ## Installation
16
+
17
+ ```bash
18
+ npm install @docbook/calendar
19
+ # or
20
+ yarn add @docbook/calendar
21
+ ```
22
+
23
+ ## Peer Dependencies
24
+
25
+ ```json
26
+ {
27
+ "react": "^18.0.0 || ^19.0.0",
28
+ "react-dom": "^18.0.0 || ^19.0.0",
29
+ "date-range-utils": "^1.0.16",
30
+ "date-fns": "^4.1.0"
31
+ }
32
+ ```
33
+
34
+ ## Basic Usage
35
+
36
+ ```tsx
37
+ import { Calendar } from '@docbook/calendar';
38
+ import type { DateInfo, MonthInfo } from 'date-range-utils';
39
+ import { DateRange, StandardDateGenerationStrategy, MonthGroupingStrategy } from 'date-range-utils';
40
+
41
+ function MyCalendar() {
42
+ const months: MonthInfo<DateInfo>[] = useMemo(() => {
43
+ const dateFactory = (date: Date): DateInfo => ({
44
+ date,
45
+ weekNumber: getWeek(date),
46
+ });
47
+
48
+ return new DateRange<DateInfo, MonthInfo<DateInfo>>(
49
+ new Date(2025, 0, 1),
50
+ new Date(2025, 11, 31),
51
+ )
52
+ .create(new StandardDateGenerationStrategy(dateFactory))
53
+ .group(new MonthGroupingStrategy());
54
+ }, []);
55
+
56
+ const renderDay = (dateInfo: DateInfo) => {
57
+ return (
58
+ <div>
59
+ {dateInfo.date.getDate()}
60
+ </div>
61
+ );
62
+ };
63
+
64
+ return (
65
+ <Calendar
66
+ months={months}
67
+ renderDay={renderDay}
68
+ />
69
+ );
70
+ }
71
+ ```
72
+
73
+ ## Infinite Scrolling
74
+
75
+ The Calendar component supports infinite scrolling out of the box:
76
+
77
+ ```tsx
78
+ <Calendar
79
+ months={months}
80
+ renderDay={renderDay}
81
+ onLoadMore={async () => {
82
+ // Load more months
83
+ await loadMoreMonths();
84
+ }}
85
+ hasMore={hasMoreMonths}
86
+ isLoading={isLoading}
87
+ />
88
+ ```
89
+
90
+ ## Custom Rendering
91
+
92
+ All components support render props for maximum customization:
93
+
94
+ ```tsx
95
+ <Calendar
96
+ months={months}
97
+ renderDay={(dateInfo) => (
98
+ <Day
99
+ dateInfo={dateInfo}
100
+ onDateClick={handleDateClick}
101
+ renderDate={(dayNumber) => (
102
+ <span className="custom-day">{dayNumber}</span>
103
+ )}
104
+ renderIndicator={({ isDotted, dotType }) => (
105
+ isDotted ? <CustomIndicator type={dotType} /> : null
106
+ )}
107
+ />
108
+ )}
109
+ />
110
+ ```
111
+
112
+ ## Components
113
+
114
+ ### Calendar
115
+
116
+ Main orchestrator component.
117
+
118
+ **Props:**
119
+ - `months`: Array of month information (required)
120
+ - `renderDay`: Function to render day cells (required)
121
+ - `renderWeekNumber`: Function to render week numbers (optional)
122
+ - `renderMonthHeader`: Function to render month headers (optional)
123
+ - `showWeekNumbers`: Whether to show week numbers (default: true)
124
+ - `onLoadMore`: Infinite scroll callback (optional)
125
+ - `hasMore`: Whether there are more items to load (optional)
126
+ - `isLoading`: Whether currently loading (optional)
127
+ - `className`: Additional CSS class name (optional)
128
+ - `headerClassName`: Additional CSS class for header (optional)
129
+ - `bodyClassName`: Additional CSS class for body (optional)
130
+
131
+ ### Day
132
+
133
+ Day cell component with render props support.
134
+
135
+ **Props:**
136
+ - `dateInfo`: Date information
137
+ - `onDateClick`: Callback when date is clicked
138
+ - `onClick`: Additional click handler
139
+ - `isSelected`: Whether the day is selected
140
+ - `isRounded`: Whether the day has rounded corners
141
+ - `isMarked`: Whether the day is marked (e.g., today)
142
+ - `isDotted`: Whether the day has a dot indicator
143
+ - `dotType`: Type of dot indicator ('primary' | 'secondary')
144
+ - `renderDate`: Custom render function for date display
145
+ - `renderIndicator`: Custom render function for indicator
146
+ - `className`: Additional CSS class name
147
+
148
+ ### Week
149
+
150
+ Week number component with render props support.
151
+
152
+ **Props:**
153
+ - `text`: Week number text (e.g., "W1")
154
+ - `isMultiMonth`: Whether the week spans multiple months
155
+ - `onClick`: Click handler
156
+ - `isDotted`: Whether the week has a dot indicator
157
+ - `isFocused`: Whether the week is focused
158
+ - `dotType`: Type of dot indicator
159
+ - `renderText`: Custom render function for text display
160
+ - `renderIndicator`: Custom render function for indicator
161
+ - `className`: Additional CSS class name
162
+
163
+ ### MonthHeader
164
+
165
+ Month header component with render props support.
166
+
167
+ **Props:**
168
+ - `text`: Month name text
169
+ - `onClick`: Click handler
170
+ - `isFocused`: Whether the month is focused
171
+ - `isDotted`: Whether the month has a dot indicator
172
+ - `dotType`: Type of dot indicator
173
+ - `renderText`: Custom render function for text display
174
+ - `renderIndicator`: Custom render function for indicator
175
+ - `className`: Additional CSS class name
176
+
177
+ ## Utilities
178
+
179
+ ### Date Formatting
180
+
181
+ ```tsx
182
+ import { formatCalendarDate } from '@docbook/calendar';
183
+
184
+ const dayString = formatCalendarDate.day(new Date()); // "2025-01-15"
185
+ const weekString = formatCalendarDate.week(new Date(), 3); // "2025-W3"
186
+ const monthString = formatCalendarDate.month(2025, "January"); // "2025-M1"
187
+ ```
188
+
189
+ ### Grid Utilities
190
+
191
+ ```tsx
192
+ import { isWeekNumberCell, calculateGridIndex } from '@docbook/calendar';
193
+
194
+ const isWeekNumber = isWeekNumberCell(7); // true (index 7 is week number column)
195
+ const index = calculateGridIndex(2, 3, 8); // 19 (row 2, col 3, 8 columns)
196
+ ```
197
+
198
+ ### Scroll Utilities
199
+
200
+ ```tsx
201
+ import { scrollToDate, findDateElement } from '@docbook/calendar';
202
+
203
+ await scrollToDate('2025-01-15', containerRef.current);
204
+ const element = findDateElement('2025-01-15', containerRef.current);
205
+ ```
206
+
207
+ ## Hooks
208
+
209
+ ### useCalendarItems
210
+
211
+ Generic hook to generate props for calendar components.
212
+
213
+ ```tsx
214
+ import { useCalendarItems } from '@docbook/calendar';
215
+
216
+ const { getDayProps, getWeekNumberProps, getMonthHeaderProps } = useCalendarItems({
217
+ currentDate: '2025-01-15',
218
+ setCurrentDate: (date) => console.log(date),
219
+ getIndicatorProps: (formattedDate) => ({
220
+ isDotted: true,
221
+ dotType: 'primary',
222
+ }),
223
+ });
224
+ ```
225
+
226
+ ### useInfiniteScroll
227
+
228
+ Hook for infinite scrolling support.
229
+
230
+ ```tsx
231
+ import { useInfiniteScroll } from '@docbook/calendar';
232
+
233
+ const { sentinelRef } = useInfiniteScroll({
234
+ hasMore: true,
235
+ isLoading: false,
236
+ onLoadMore: async () => {
237
+ await loadMore();
238
+ },
239
+ scrollRef: containerRef,
240
+ });
241
+ ```
242
+
243
+ ### useScrollToDate
244
+
245
+ Hook for scrolling to a specific date.
246
+
247
+ ```tsx
248
+ import { useScrollToDate } from '@docbook/calendar';
249
+
250
+ const { scrollTo, findElement } = useScrollToDate({
251
+ scrollRef: containerRef,
252
+ });
253
+
254
+ await scrollTo('2025-01-15');
255
+ ```
256
+
257
+ ## Theming
258
+
259
+ The component uses CSS variables for theming. Override them in your CSS:
260
+
261
+ ```css
262
+ :root {
263
+ --calendar-bg-color: #F5F6F8;
264
+ --day-cell-height: 80px;
265
+ --day-cell-marked-bg: #ef4444;
266
+ --indicator-primary-color: #ef4444;
267
+ /* ... more variables */
268
+ }
269
+ ```
270
+
271
+ ## TypeScript
272
+
273
+ All components and utilities are fully typed. Import types as needed:
274
+
275
+ ```tsx
276
+ import type {
277
+ CalendarProps,
278
+ DayProps,
279
+ WeekProps,
280
+ MonthHeaderProps,
281
+ } from '@docbook/calendar';
282
+ ```
283
+
284
+ ## Styling
285
+
286
+ The component uses CSS modules. Import the compiled CSS:
287
+
288
+ ```tsx
289
+ import '@docbook/calendar/dist/styles.css';
290
+ ```
291
+
292
+ Or use CSS modules in your build configuration.
293
+
294
+ ## Migration from Monorepo
295
+
296
+ If you're migrating from the monorepo version:
297
+
298
+ 1. Replace `@shared/ui/organisms/Calendar` imports with `@docbook/calendar`
299
+ 2. Remove `@shared/styles` SCSS imports (variables are now included)
300
+ 3. Update any internal component dependencies (now using render props)
301
+ 4. Ensure peer dependencies are installed
302
+
303
+ ## License
304
+
305
+ MIT
306
+
307
+ ## Contributing
308
+
309
+ Contributions are welcome! Please read our contributing guidelines first.
310
+
@@ -0,0 +1,12 @@
1
+ /**
2
+ * Calendar component - Main orchestrator for infinite scrolling calendar
3
+ */
4
+ import type { CalendarProps } from './Calendar.types';
5
+ /**
6
+ * Calendar component - Main orchestrator
7
+ * Supports infinite scrolling and customizable rendering
8
+ */
9
+ declare function Calendar(props: CalendarProps): import("react/jsx-runtime").JSX.Element;
10
+ declare const _default: import("react").MemoExoticComponent<typeof Calendar>;
11
+ export default _default;
12
+ //# sourceMappingURL=Calendar.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Calendar.d.ts","sourceRoot":"","sources":["../../../src/components/Calendar/Calendar.tsx"],"names":[],"mappings":"AAAA;;GAEG;AAIH,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,kBAAkB,CAAC;AAKtD;;;GAGG;AACH,iBAAS,QAAQ,CAAC,KAAK,EAAE,aAAa,2CA6CrC;;AAED,wBAA8B"}
@@ -0,0 +1,33 @@
1
+ /**
2
+ * Calendar component types
3
+ */
4
+ import type { DateInfo, MonthInfo } from 'date-range-utils';
5
+ import type { ReactNode } from 'react';
6
+ /**
7
+ * Calendar component props
8
+ */
9
+ export interface CalendarProps {
10
+ /** Array of month information */
11
+ months: MonthInfo<DateInfo>[];
12
+ /** Render function for day cells */
13
+ renderDay: (dateInfo: DateInfo, index?: number, sectionIndex?: number) => ReactNode;
14
+ /** Render function for week number cells (optional) */
15
+ renderWeekNumber?: (dateInfo: DateInfo, index?: number, sectionIndex?: number) => ReactNode;
16
+ /** Render function for month header (optional) */
17
+ renderMonthHeader?: (monthName: string) => ReactNode;
18
+ /** Whether to show week numbers (default: true) */
19
+ showWeekNumbers?: boolean;
20
+ /** Infinite scroll callback - called when more items should be loaded */
21
+ onLoadMore?: () => void | Promise<void>;
22
+ /** Whether there are more items to load */
23
+ hasMore?: boolean;
24
+ /** Whether currently loading more items */
25
+ isLoading?: boolean;
26
+ /** Additional CSS class name for root */
27
+ className?: string;
28
+ /** Additional CSS class name for header */
29
+ headerClassName?: string;
30
+ /** Additional CSS class name for scrollable body */
31
+ bodyClassName?: string;
32
+ }
33
+ //# sourceMappingURL=Calendar.types.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Calendar.types.d.ts","sourceRoot":"","sources":["../../../src/components/Calendar/Calendar.types.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,KAAK,EAAE,QAAQ,EAAE,SAAS,EAAE,MAAM,kBAAkB,CAAC;AAC5D,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAEvC;;GAEG;AACH,MAAM,WAAW,aAAa;IAC5B,iCAAiC;IACjC,MAAM,EAAE,SAAS,CAAC,QAAQ,CAAC,EAAE,CAAC;IAC9B,oCAAoC;IACpC,SAAS,EAAE,CACT,QAAQ,EAAE,QAAQ,EAClB,KAAK,CAAC,EAAE,MAAM,EACd,YAAY,CAAC,EAAE,MAAM,KAClB,SAAS,CAAC;IACf,uDAAuD;IACvD,gBAAgB,CAAC,EAAE,CACjB,QAAQ,EAAE,QAAQ,EAClB,KAAK,CAAC,EAAE,MAAM,EACd,YAAY,CAAC,EAAE,MAAM,KAClB,SAAS,CAAC;IACf,kDAAkD;IAClD,iBAAiB,CAAC,EAAE,CAAC,SAAS,EAAE,MAAM,KAAK,SAAS,CAAC;IACrD,mDAAmD;IACnD,eAAe,CAAC,EAAE,OAAO,CAAC;IAC1B,yEAAyE;IACzE,UAAU,CAAC,EAAE,MAAM,IAAI,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;IACxC,2CAA2C;IAC3C,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,2CAA2C;IAC3C,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,yCAAyC;IACzC,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,2CAA2C;IAC3C,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB,oDAAoD;IACpD,aAAa,CAAC,EAAE,MAAM,CAAC;CACxB"}
@@ -0,0 +1,7 @@
1
+ /**
2
+ * Day component - Pure presentation component for calendar day cells
3
+ */
4
+ import type { DayProps } from './Day.types';
5
+ declare const _default: import("react").NamedExoticComponent<DayProps & import("react").RefAttributes<HTMLDivElement>>;
6
+ export default _default;
7
+ //# sourceMappingURL=Day.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Day.d.ts","sourceRoot":"","sources":["../../../src/components/Day/Day.tsx"],"names":[],"mappings":"AAAA;;GAEG;AAKH,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,aAAa,CAAC;;AAwF5C,wBASE"}
@@ -0,0 +1,40 @@
1
+ /**
2
+ * Day component types
3
+ */
4
+ import type { DateInfo } from 'date-range-utils';
5
+ import type { ReactNode } from 'react';
6
+ /**
7
+ * Indicator props for render prop
8
+ */
9
+ export interface DayIndicatorProps {
10
+ isDotted: boolean;
11
+ dotType: 'primary' | 'secondary';
12
+ }
13
+ /**
14
+ * Day component props
15
+ */
16
+ export interface DayProps {
17
+ /** Date information */
18
+ dateInfo: DateInfo;
19
+ /** Callback when date is clicked */
20
+ onDateClick: (dateInfo: DateInfo) => void;
21
+ /** Additional click handler */
22
+ onClick?: () => void;
23
+ /** Whether the day is selected */
24
+ isSelected?: boolean;
25
+ /** Whether the day has rounded corners */
26
+ isRounded?: boolean;
27
+ /** Whether the day is marked (e.g., today) */
28
+ isMarked?: boolean;
29
+ /** Whether the day has a dot indicator */
30
+ isDotted?: boolean;
31
+ /** Type of dot indicator */
32
+ dotType?: 'primary' | 'secondary';
33
+ /** Custom render function for date display */
34
+ renderDate?: (dayNumber: number) => ReactNode;
35
+ /** Custom render function for indicator */
36
+ renderIndicator?: (props: DayIndicatorProps) => ReactNode;
37
+ /** Additional CSS class name */
38
+ className?: string;
39
+ }
40
+ //# sourceMappingURL=Day.types.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Day.types.d.ts","sourceRoot":"","sources":["../../../src/components/Day/Day.types.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,kBAAkB,CAAC;AACjD,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAEvC;;GAEG;AACH,MAAM,WAAW,iBAAiB;IAChC,QAAQ,EAAE,OAAO,CAAC;IAClB,OAAO,EAAE,SAAS,GAAG,WAAW,CAAC;CAClC;AAED;;GAEG;AACH,MAAM,WAAW,QAAQ;IACvB,uBAAuB;IACvB,QAAQ,EAAE,QAAQ,CAAC;IACnB,oCAAoC;IACpC,WAAW,EAAE,CAAC,QAAQ,EAAE,QAAQ,KAAK,IAAI,CAAC;IAC1C,+BAA+B;IAC/B,OAAO,CAAC,EAAE,MAAM,IAAI,CAAC;IACrB,kCAAkC;IAClC,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,0CAA0C;IAC1C,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,8CAA8C;IAC9C,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,0CAA0C;IAC1C,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,4BAA4B;IAC5B,OAAO,CAAC,EAAE,SAAS,GAAG,WAAW,CAAC;IAClC,8CAA8C;IAC9C,UAAU,CAAC,EAAE,CAAC,SAAS,EAAE,MAAM,KAAK,SAAS,CAAC;IAC9C,2CAA2C;IAC3C,eAAe,CAAC,EAAE,CAAC,KAAK,EAAE,iBAAiB,KAAK,SAAS,CAAC;IAC1D,gCAAgC;IAChC,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB"}
@@ -0,0 +1,12 @@
1
+ /**
2
+ * MonthHeader component - Pure presentation component for calendar month headers
3
+ */
4
+ import type { MonthHeaderProps } from './MonthHeader.types';
5
+ /**
6
+ * MonthHeader component for calendar month headers
7
+ * Supports render props for customizing text display and indicator
8
+ */
9
+ declare function MonthHeader(props: MonthHeaderProps): import("react/jsx-runtime").JSX.Element;
10
+ declare const _default: import("react").MemoExoticComponent<typeof MonthHeader>;
11
+ export default _default;
12
+ //# sourceMappingURL=MonthHeader.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"MonthHeader.d.ts","sourceRoot":"","sources":["../../../src/components/MonthHeader/MonthHeader.tsx"],"names":[],"mappings":"AAAA;;GAEG;AAIH,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,qBAAqB,CAAC;AAG5D;;;GAGG;AACH,iBAAS,WAAW,CAAC,KAAK,EAAE,gBAAgB,2CA0C3C;;AAED,wBAAiC"}
@@ -0,0 +1,33 @@
1
+ /**
2
+ * MonthHeader component types
3
+ */
4
+ import type { ReactNode } from 'react';
5
+ /**
6
+ * Indicator props for render prop
7
+ */
8
+ export interface MonthHeaderIndicatorProps {
9
+ isDotted: boolean;
10
+ dotType: 'primary' | 'secondary';
11
+ }
12
+ /**
13
+ * MonthHeader component props
14
+ */
15
+ export interface MonthHeaderProps {
16
+ /** Month name text */
17
+ text: string;
18
+ /** Click handler */
19
+ onClick?: () => void;
20
+ /** Whether the month is focused */
21
+ isFocused?: boolean;
22
+ /** Whether the month has a dot indicator */
23
+ isDotted?: boolean;
24
+ /** Type of dot indicator */
25
+ dotType?: 'primary' | 'secondary';
26
+ /** Custom render function for text display */
27
+ renderText?: (text: string) => ReactNode;
28
+ /** Custom render function for indicator */
29
+ renderIndicator?: (props: MonthHeaderIndicatorProps) => ReactNode;
30
+ /** Additional CSS class name */
31
+ className?: string;
32
+ }
33
+ //# sourceMappingURL=MonthHeader.types.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"MonthHeader.types.d.ts","sourceRoot":"","sources":["../../../src/components/MonthHeader/MonthHeader.types.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAEvC;;GAEG;AACH,MAAM,WAAW,yBAAyB;IACxC,QAAQ,EAAE,OAAO,CAAC;IAClB,OAAO,EAAE,SAAS,GAAG,WAAW,CAAC;CAClC;AAED;;GAEG;AACH,MAAM,WAAW,gBAAgB;IAC/B,sBAAsB;IACtB,IAAI,EAAE,MAAM,CAAC;IACb,oBAAoB;IACpB,OAAO,CAAC,EAAE,MAAM,IAAI,CAAC;IACrB,mCAAmC;IACnC,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,4CAA4C;IAC5C,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,4BAA4B;IAC5B,OAAO,CAAC,EAAE,SAAS,GAAG,WAAW,CAAC;IAClC,8CAA8C;IAC9C,UAAU,CAAC,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,SAAS,CAAC;IACzC,2CAA2C;IAC3C,eAAe,CAAC,EAAE,CAAC,KAAK,EAAE,yBAAyB,KAAK,SAAS,CAAC;IAClE,gCAAgC;IAChC,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB"}
@@ -0,0 +1,12 @@
1
+ /**
2
+ * MonthList component - Infinite scrolling grid layout for calendar months
3
+ */
4
+ import type { MonthListProps } from './MonthList.types';
5
+ /**
6
+ * MonthList component for infinite scrolling calendar
7
+ * Handles grid layout and infinite scroll support
8
+ */
9
+ declare function MonthList(props: MonthListProps): import("react/jsx-runtime").JSX.Element;
10
+ declare const _default: import("react").MemoExoticComponent<typeof MonthList>;
11
+ export default _default;
12
+ //# sourceMappingURL=MonthList.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"MonthList.d.ts","sourceRoot":"","sources":["../../../src/components/MonthList/MonthList.tsx"],"names":[],"mappings":"AAAA;;GAEG;AAKH,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,mBAAmB,CAAC;AAWxD;;;GAGG;AACH,iBAAS,SAAS,CAAC,KAAK,EAAE,cAAc,2CA2FvC;;AAED,wBAA+B"}
@@ -0,0 +1,31 @@
1
+ /**
2
+ * MonthList component types
3
+ */
4
+ import type { DateInfo, MonthInfo } from 'date-range-utils';
5
+ import type { ReactNode, RefObject } from 'react';
6
+ /**
7
+ * MonthList component props
8
+ */
9
+ export interface MonthListProps {
10
+ /** Array of month information */
11
+ months: MonthInfo<DateInfo>[];
12
+ /** Render function for day cells */
13
+ renderDay: (dateInfo: DateInfo, index?: number, sectionIndex?: number) => ReactNode;
14
+ /** Render function for week number cells (optional) */
15
+ renderWeekNumber?: (dateInfo: DateInfo, index?: number, sectionIndex?: number) => ReactNode;
16
+ /** Render function for month header (optional) */
17
+ renderMonthHeader?: (monthName: string) => ReactNode;
18
+ /** Whether to show week numbers (default: true) */
19
+ showWeekNumbers?: boolean;
20
+ /** Infinite scroll callback - called when more items should be loaded */
21
+ onLoadMore?: () => void | Promise<void>;
22
+ /** Whether there are more items to load */
23
+ hasMore?: boolean;
24
+ /** Whether currently loading more items */
25
+ isLoading?: boolean;
26
+ /** Ref to the scrollable container */
27
+ scrollRef?: RefObject<HTMLElement | null>;
28
+ /** Additional CSS class name */
29
+ className?: string;
30
+ }
31
+ //# sourceMappingURL=MonthList.types.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"MonthList.types.d.ts","sourceRoot":"","sources":["../../../src/components/MonthList/MonthList.types.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,KAAK,EAAE,QAAQ,EAAE,SAAS,EAAE,MAAM,kBAAkB,CAAC;AAC5D,OAAO,KAAK,EAAE,SAAS,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAElD;;GAEG;AACH,MAAM,WAAW,cAAc;IAC7B,iCAAiC;IACjC,MAAM,EAAE,SAAS,CAAC,QAAQ,CAAC,EAAE,CAAC;IAC9B,oCAAoC;IACpC,SAAS,EAAE,CACT,QAAQ,EAAE,QAAQ,EAClB,KAAK,CAAC,EAAE,MAAM,EACd,YAAY,CAAC,EAAE,MAAM,KAClB,SAAS,CAAC;IACf,uDAAuD;IACvD,gBAAgB,CAAC,EAAE,CACjB,QAAQ,EAAE,QAAQ,EAClB,KAAK,CAAC,EAAE,MAAM,EACd,YAAY,CAAC,EAAE,MAAM,KAClB,SAAS,CAAC;IACf,kDAAkD;IAClD,iBAAiB,CAAC,EAAE,CAAC,SAAS,EAAE,MAAM,KAAK,SAAS,CAAC;IACrD,mDAAmD;IACnD,eAAe,CAAC,EAAE,OAAO,CAAC;IAC1B,yEAAyE;IACzE,UAAU,CAAC,EAAE,MAAM,IAAI,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;IACxC,2CAA2C;IAC3C,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,2CAA2C;IAC3C,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,sCAAsC;IACtC,SAAS,CAAC,EAAE,SAAS,CAAC,WAAW,GAAG,IAAI,CAAC,CAAC;IAC1C,gCAAgC;IAChC,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB"}
@@ -0,0 +1,12 @@
1
+ /**
2
+ * Week component - Pure presentation component for calendar week numbers
3
+ */
4
+ import type { WeekProps } from './Week.types';
5
+ /**
6
+ * Week component for calendar week numbers
7
+ * Supports render props for customizing text display and indicator
8
+ */
9
+ declare function Week(props: WeekProps): import("react/jsx-runtime").JSX.Element;
10
+ declare const _default: import("react").MemoExoticComponent<typeof Week>;
11
+ export default _default;
12
+ //# sourceMappingURL=Week.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Week.d.ts","sourceRoot":"","sources":["../../../src/components/Week/Week.tsx"],"names":[],"mappings":"AAAA;;GAEG;AAIH,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AAG9C;;;GAGG;AACH,iBAAS,IAAI,CAAC,KAAK,EAAE,SAAS,2CA4C7B;;AAED,wBAA0B"}
@@ -0,0 +1,35 @@
1
+ /**
2
+ * Week component types
3
+ */
4
+ import type { ReactNode } from 'react';
5
+ /**
6
+ * Indicator props for render prop
7
+ */
8
+ export interface WeekIndicatorProps {
9
+ isDotted: boolean;
10
+ dotType: 'primary' | 'secondary';
11
+ }
12
+ /**
13
+ * Week component props
14
+ */
15
+ export interface WeekProps {
16
+ /** Week number text (e.g., "W1") */
17
+ text: string;
18
+ /** Whether the week spans multiple months */
19
+ isMultiMonth?: boolean;
20
+ /** Click handler */
21
+ onClick?: () => void;
22
+ /** Whether the week has a dot indicator */
23
+ isDotted?: boolean;
24
+ /** Whether the week is focused */
25
+ isFocused?: boolean;
26
+ /** Type of dot indicator */
27
+ dotType?: 'primary' | 'secondary';
28
+ /** Custom render function for text display */
29
+ renderText?: (text: string) => ReactNode;
30
+ /** Custom render function for indicator */
31
+ renderIndicator?: (props: WeekIndicatorProps) => ReactNode;
32
+ /** Additional CSS class name */
33
+ className?: string;
34
+ }
35
+ //# sourceMappingURL=Week.types.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Week.types.d.ts","sourceRoot":"","sources":["../../../src/components/Week/Week.types.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAEvC;;GAEG;AACH,MAAM,WAAW,kBAAkB;IACjC,QAAQ,EAAE,OAAO,CAAC;IAClB,OAAO,EAAE,SAAS,GAAG,WAAW,CAAC;CAClC;AAED;;GAEG;AACH,MAAM,WAAW,SAAS;IACxB,oCAAoC;IACpC,IAAI,EAAE,MAAM,CAAC;IACb,6CAA6C;IAC7C,YAAY,CAAC,EAAE,OAAO,CAAC;IACvB,oBAAoB;IACpB,OAAO,CAAC,EAAE,MAAM,IAAI,CAAC;IACrB,2CAA2C;IAC3C,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,kCAAkC;IAClC,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,4BAA4B;IAC5B,OAAO,CAAC,EAAE,SAAS,GAAG,WAAW,CAAC;IAClC,8CAA8C;IAC9C,UAAU,CAAC,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,SAAS,CAAC;IACzC,2CAA2C;IAC3C,eAAe,CAAC,EAAE,CAAC,KAAK,EAAE,kBAAkB,KAAK,SAAS,CAAC;IAC3D,gCAAgC;IAChC,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB"}
@@ -0,0 +1,16 @@
1
+ /**
2
+ * WeekdayHeader component - Pure presentation component for calendar weekday names
3
+ */
4
+ import type { WeekdayHeaderProps } from './WeekdayHeader.types';
5
+ /**
6
+ * Default weekday names
7
+ */
8
+ export declare const WEEKDAY_NAMES: readonly ["M", "T", "W", "T", "F", "S", "S", "#"];
9
+ /**
10
+ * WeekdayHeader component for calendar weekday names
11
+ * Supports render props for customizing weekday name display
12
+ */
13
+ declare function WeekdayHeader(props: WeekdayHeaderProps): import("react/jsx-runtime").JSX.Element;
14
+ declare const _default: import("react").MemoExoticComponent<typeof WeekdayHeader>;
15
+ export default _default;
16
+ //# sourceMappingURL=WeekdayHeader.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"WeekdayHeader.d.ts","sourceRoot":"","sources":["../../../src/components/WeekdayHeader/WeekdayHeader.tsx"],"names":[],"mappings":"AAAA;;GAEG;AAGH,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,uBAAuB,CAAC;AAGhE;;GAEG;AACH,eAAO,MAAM,aAAa,mDAAoD,CAAC;AAE/E;;;GAGG;AACH,iBAAS,aAAa,CAAC,KAAK,EAAE,kBAAkB,2CAqB/C;;AAED,wBAAmC"}
@@ -0,0 +1,16 @@
1
+ /**
2
+ * WeekdayHeader component types
3
+ */
4
+ import type { ReactNode } from 'react';
5
+ /**
6
+ * WeekdayHeader component props
7
+ */
8
+ export interface WeekdayHeaderProps {
9
+ /** Array of weekday names (default: ['M', 'T', 'W', 'T', 'F', 'S', 'S', '#']) */
10
+ weekdayNames?: readonly string[];
11
+ /** Custom render function for weekday name display */
12
+ renderWeekdayName?: (name: string, index: number) => ReactNode;
13
+ /** Additional CSS class name */
14
+ className?: string;
15
+ }
16
+ //# sourceMappingURL=WeekdayHeader.types.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"WeekdayHeader.types.d.ts","sourceRoot":"","sources":["../../../src/components/WeekdayHeader/WeekdayHeader.types.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAEvC;;GAEG;AACH,MAAM,WAAW,kBAAkB;IACjC,iFAAiF;IACjF,YAAY,CAAC,EAAE,SAAS,MAAM,EAAE,CAAC;IACjC,sDAAsD;IACtD,iBAAiB,CAAC,EAAE,CAAC,IAAI,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,KAAK,SAAS,CAAC;IAC/D,gCAAgC;IAChC,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB"}