kalendly 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 +492 -0
- package/dist/core/index.d.mts +181 -0
- package/dist/core/index.d.ts +181 -0
- package/dist/core/index.js +349 -0
- package/dist/core/index.js.map +1 -0
- package/dist/core/index.mjs +309 -0
- package/dist/core/index.mjs.map +1 -0
- package/dist/index.d.mts +623 -0
- package/dist/index.d.ts +623 -0
- package/dist/index.js +1445 -0
- package/dist/index.js.map +1 -0
- package/dist/index.mjs +1403 -0
- package/dist/index.mjs.map +1 -0
- package/dist/react/index.d.mts +208 -0
- package/dist/react/index.d.ts +208 -0
- package/dist/react/index.js +558 -0
- package/dist/react/index.js.map +1 -0
- package/dist/react/index.mjs +516 -0
- package/dist/react/index.mjs.map +1 -0
- package/dist/react-native/index.d.mts +465 -0
- package/dist/react-native/index.d.ts +465 -0
- package/dist/react-native/index.js +894 -0
- package/dist/react-native/index.js.map +1 -0
- package/dist/react-native/index.mjs +851 -0
- package/dist/react-native/index.mjs.map +1 -0
- package/dist/styles/calendar.css +500 -0
- package/dist/vanilla/index.d.mts +214 -0
- package/dist/vanilla/index.d.ts +214 -0
- package/dist/vanilla/index.js +621 -0
- package/dist/vanilla/index.js.map +1 -0
- package/dist/vanilla/index.mjs +579 -0
- package/dist/vanilla/index.mjs.map +1 -0
- package/dist/vanilla/index.umd.js +604 -0
- package/dist/vanilla/index.umd.js.map +1 -0
- package/dist/vue/index.js +1 -0
- package/dist/vue/index.mjs +439 -0
- package/package.json +161 -0
package/dist/index.d.mts
ADDED
|
@@ -0,0 +1,623 @@
|
|
|
1
|
+
import React, { CSSProperties, ReactNode } from 'react';
|
|
2
|
+
import { ViewStyle, TextStyle } from 'react-native';
|
|
3
|
+
|
|
4
|
+
interface CalendarEvent {
|
|
5
|
+
id: string | number;
|
|
6
|
+
name: string;
|
|
7
|
+
date: string | Date;
|
|
8
|
+
description?: string;
|
|
9
|
+
color?: string;
|
|
10
|
+
[key: string]: any;
|
|
11
|
+
}
|
|
12
|
+
interface CalendarDate {
|
|
13
|
+
date: Date;
|
|
14
|
+
isCurrentMonth: boolean;
|
|
15
|
+
isToday: boolean;
|
|
16
|
+
hasEvents: boolean;
|
|
17
|
+
events: CalendarEvent[];
|
|
18
|
+
}
|
|
19
|
+
interface CalendarState {
|
|
20
|
+
currentYear: number;
|
|
21
|
+
currentMonth: number;
|
|
22
|
+
currentDate: number;
|
|
23
|
+
selectedDate: Date | null;
|
|
24
|
+
selectedDayIndex: number | null;
|
|
25
|
+
tasks: CalendarEvent[];
|
|
26
|
+
}
|
|
27
|
+
interface CalendarConfig {
|
|
28
|
+
events: CalendarEvent[];
|
|
29
|
+
initialDate?: Date;
|
|
30
|
+
minYear?: number;
|
|
31
|
+
maxYear?: number;
|
|
32
|
+
weekStartsOn?: 0 | 1;
|
|
33
|
+
}
|
|
34
|
+
interface CalendarActions {
|
|
35
|
+
next: () => void;
|
|
36
|
+
previous: () => void;
|
|
37
|
+
jump: (year: number, month: number) => void;
|
|
38
|
+
selectDate: (date: Date) => void;
|
|
39
|
+
updateTasks: () => void;
|
|
40
|
+
}
|
|
41
|
+
interface PopupPosition {
|
|
42
|
+
class: 'popup-left' | 'popup-right' | 'popup-center-top' | 'popup-center-bottom';
|
|
43
|
+
style?: Record<string, string | number>;
|
|
44
|
+
}
|
|
45
|
+
interface CalendarViewModel extends CalendarState {
|
|
46
|
+
months: string[];
|
|
47
|
+
days: string[];
|
|
48
|
+
years: number[];
|
|
49
|
+
monthAndYearText: string;
|
|
50
|
+
scheduleDay: string;
|
|
51
|
+
calendarDates: (CalendarDate | null)[][];
|
|
52
|
+
popupPositionClass: string;
|
|
53
|
+
}
|
|
54
|
+
type CalendarEventHandler = (event: CalendarEvent) => void;
|
|
55
|
+
interface CalendarProps {
|
|
56
|
+
events: CalendarEvent[];
|
|
57
|
+
initialDate?: Date;
|
|
58
|
+
minYear?: number;
|
|
59
|
+
maxYear?: number;
|
|
60
|
+
weekStartsOn?: 0 | 1;
|
|
61
|
+
onDateSelect?: (date: Date) => void;
|
|
62
|
+
onEventClick?: CalendarEventHandler;
|
|
63
|
+
onMonthChange?: (year: number, month: number) => void;
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
declare const MONTHS: string[];
|
|
67
|
+
declare const DAYS: string[];
|
|
68
|
+
/**
|
|
69
|
+
* Normalizes a date to midnight (00:00:00) for comparison purposes
|
|
70
|
+
*/
|
|
71
|
+
declare function normalizeDate(date: Date): Date;
|
|
72
|
+
/**
|
|
73
|
+
* Checks if two dates are the same day
|
|
74
|
+
*/
|
|
75
|
+
declare function isSameDay(date1: Date, date2: Date): boolean;
|
|
76
|
+
/**
|
|
77
|
+
* Checks if a date is today
|
|
78
|
+
*/
|
|
79
|
+
declare function isToday(date: Date): boolean;
|
|
80
|
+
/**
|
|
81
|
+
* Generates an array of years for the year selector
|
|
82
|
+
*/
|
|
83
|
+
declare function generateYears(minYear?: number, maxYear?: number): number[];
|
|
84
|
+
/**
|
|
85
|
+
* Gets events for a specific date
|
|
86
|
+
*/
|
|
87
|
+
declare function getEventsForDate(events: CalendarEvent[], date: Date): CalendarEvent[];
|
|
88
|
+
/**
|
|
89
|
+
* Checks if a date has any events
|
|
90
|
+
*/
|
|
91
|
+
declare function hasEvents(events: CalendarEvent[], date: Date): boolean;
|
|
92
|
+
/**
|
|
93
|
+
* Generates calendar dates for a given month and year
|
|
94
|
+
*/
|
|
95
|
+
declare function generateCalendarDates(year: number, month: number, events?: CalendarEvent[], weekStartsOn?: 0 | 1): (CalendarDate | null)[][];
|
|
96
|
+
/**
|
|
97
|
+
* Gets the popup position class based on the selected day index
|
|
98
|
+
*/
|
|
99
|
+
declare function getPopupPositionClass(selectedDayIndex: number | null): string;
|
|
100
|
+
/**
|
|
101
|
+
* Gets CSS classes for a calendar cell
|
|
102
|
+
*/
|
|
103
|
+
declare function getCellClasses(calendarDate: CalendarDate | null): string[];
|
|
104
|
+
/**
|
|
105
|
+
* Formats a date for display
|
|
106
|
+
*/
|
|
107
|
+
declare function formatDateForDisplay(date: Date): string;
|
|
108
|
+
/**
|
|
109
|
+
* Gets month and year text for display
|
|
110
|
+
*/
|
|
111
|
+
declare function getMonthYearText(year: number, month: number): string;
|
|
112
|
+
|
|
113
|
+
declare class CalendarEngine {
|
|
114
|
+
private state;
|
|
115
|
+
private config;
|
|
116
|
+
private listeners;
|
|
117
|
+
constructor(config: CalendarConfig);
|
|
118
|
+
/**
|
|
119
|
+
* Subscribe to state changes
|
|
120
|
+
*/
|
|
121
|
+
subscribe(listener: () => void): () => void;
|
|
122
|
+
/**
|
|
123
|
+
* Notify all listeners of state changes
|
|
124
|
+
*/
|
|
125
|
+
private notify;
|
|
126
|
+
/**
|
|
127
|
+
* Get current state
|
|
128
|
+
*/
|
|
129
|
+
getState(): CalendarState;
|
|
130
|
+
/**
|
|
131
|
+
* Get view model with computed properties
|
|
132
|
+
*/
|
|
133
|
+
getViewModel(): CalendarViewModel;
|
|
134
|
+
/**
|
|
135
|
+
* Get actions object
|
|
136
|
+
*/
|
|
137
|
+
getActions(): CalendarActions;
|
|
138
|
+
/**
|
|
139
|
+
* Navigate to next month
|
|
140
|
+
*/
|
|
141
|
+
private next;
|
|
142
|
+
/**
|
|
143
|
+
* Navigate to previous month
|
|
144
|
+
*/
|
|
145
|
+
private previous;
|
|
146
|
+
/**
|
|
147
|
+
* Jump to specific month and year
|
|
148
|
+
*/
|
|
149
|
+
private jump;
|
|
150
|
+
/**
|
|
151
|
+
* Select a specific date
|
|
152
|
+
*/
|
|
153
|
+
private selectDate;
|
|
154
|
+
/**
|
|
155
|
+
* Update tasks for the currently selected date
|
|
156
|
+
*/
|
|
157
|
+
private updateTasks;
|
|
158
|
+
/**
|
|
159
|
+
* Update events configuration
|
|
160
|
+
*/
|
|
161
|
+
updateEvents(events: CalendarEvent[]): void;
|
|
162
|
+
/**
|
|
163
|
+
* Handle date cell click
|
|
164
|
+
*/
|
|
165
|
+
handleDateClick(date: Date, dayIndex?: number): void;
|
|
166
|
+
/**
|
|
167
|
+
* Check if date has events
|
|
168
|
+
*/
|
|
169
|
+
hasEventsForDate(date: Date): boolean;
|
|
170
|
+
/**
|
|
171
|
+
* Get events for a specific date
|
|
172
|
+
*/
|
|
173
|
+
getEventsForDate(date: Date): CalendarEvent[];
|
|
174
|
+
/**
|
|
175
|
+
* Clear selected date
|
|
176
|
+
*/
|
|
177
|
+
clearSelection(): void;
|
|
178
|
+
/**
|
|
179
|
+
* Destroy the engine and cleanup listeners
|
|
180
|
+
*/
|
|
181
|
+
destroy(): void;
|
|
182
|
+
}
|
|
183
|
+
|
|
184
|
+
interface ReactCalendarProps extends CalendarProps {
|
|
185
|
+
className?: string;
|
|
186
|
+
style?: CSSProperties;
|
|
187
|
+
children?: ReactNode;
|
|
188
|
+
renderEvent?: (event: CalendarEvent) => ReactNode;
|
|
189
|
+
renderNoEvents?: () => ReactNode;
|
|
190
|
+
title?: string;
|
|
191
|
+
}
|
|
192
|
+
type CalendarComponentProps$1 = ReactCalendarProps;
|
|
193
|
+
interface DatePopupProps$1 {
|
|
194
|
+
isVisible: boolean;
|
|
195
|
+
selectedDate: Date | null;
|
|
196
|
+
events: CalendarEvent[];
|
|
197
|
+
scheduleDay: string;
|
|
198
|
+
popupPositionClass: string;
|
|
199
|
+
onClose?: () => void;
|
|
200
|
+
onEventClick?: (event: CalendarEvent) => void;
|
|
201
|
+
renderEvent?: (event: CalendarEvent) => ReactNode;
|
|
202
|
+
renderNoEvents?: () => ReactNode;
|
|
203
|
+
}
|
|
204
|
+
|
|
205
|
+
declare const Calendar$1: React.FC<CalendarComponentProps$1>;
|
|
206
|
+
|
|
207
|
+
declare const DatePopup$1: React.FC<DatePopupProps$1>;
|
|
208
|
+
|
|
209
|
+
type index$2_CalendarActions = CalendarActions;
|
|
210
|
+
type index$2_CalendarConfig = CalendarConfig;
|
|
211
|
+
type index$2_CalendarDate = CalendarDate;
|
|
212
|
+
type index$2_CalendarEngine = CalendarEngine;
|
|
213
|
+
declare const index$2_CalendarEngine: typeof CalendarEngine;
|
|
214
|
+
type index$2_CalendarEvent = CalendarEvent;
|
|
215
|
+
type index$2_CalendarEventHandler = CalendarEventHandler;
|
|
216
|
+
type index$2_CalendarProps = CalendarProps;
|
|
217
|
+
type index$2_CalendarState = CalendarState;
|
|
218
|
+
type index$2_CalendarViewModel = CalendarViewModel;
|
|
219
|
+
declare const index$2_DAYS: typeof DAYS;
|
|
220
|
+
declare const index$2_MONTHS: typeof MONTHS;
|
|
221
|
+
type index$2_PopupPosition = PopupPosition;
|
|
222
|
+
type index$2_ReactCalendarProps = ReactCalendarProps;
|
|
223
|
+
declare const index$2_formatDateForDisplay: typeof formatDateForDisplay;
|
|
224
|
+
declare const index$2_generateCalendarDates: typeof generateCalendarDates;
|
|
225
|
+
declare const index$2_generateYears: typeof generateYears;
|
|
226
|
+
declare const index$2_getCellClasses: typeof getCellClasses;
|
|
227
|
+
declare const index$2_getEventsForDate: typeof getEventsForDate;
|
|
228
|
+
declare const index$2_getMonthYearText: typeof getMonthYearText;
|
|
229
|
+
declare const index$2_getPopupPositionClass: typeof getPopupPositionClass;
|
|
230
|
+
declare const index$2_hasEvents: typeof hasEvents;
|
|
231
|
+
declare const index$2_isSameDay: typeof isSameDay;
|
|
232
|
+
declare const index$2_isToday: typeof isToday;
|
|
233
|
+
declare const index$2_normalizeDate: typeof normalizeDate;
|
|
234
|
+
declare namespace index$2 {
|
|
235
|
+
export { Calendar$1 as Calendar, type index$2_CalendarActions as CalendarActions, type CalendarComponentProps$1 as CalendarComponentProps, type index$2_CalendarConfig as CalendarConfig, type index$2_CalendarDate as CalendarDate, index$2_CalendarEngine as CalendarEngine, type index$2_CalendarEvent as CalendarEvent, type index$2_CalendarEventHandler as CalendarEventHandler, type index$2_CalendarProps as CalendarProps, type index$2_CalendarState as CalendarState, type index$2_CalendarViewModel as CalendarViewModel, index$2_DAYS as DAYS, DatePopup$1 as DatePopup, type DatePopupProps$1 as DatePopupProps, index$2_MONTHS as MONTHS, type index$2_PopupPosition as PopupPosition, type index$2_ReactCalendarProps as ReactCalendarProps, index$2_formatDateForDisplay as formatDateForDisplay, index$2_generateCalendarDates as generateCalendarDates, index$2_generateYears as generateYears, index$2_getCellClasses as getCellClasses, index$2_getEventsForDate as getEventsForDate, index$2_getMonthYearText as getMonthYearText, index$2_getPopupPositionClass as getPopupPositionClass, index$2_hasEvents as hasEvents, index$2_isSameDay as isSameDay, index$2_isToday as isToday, index$2_normalizeDate as normalizeDate };
|
|
236
|
+
}
|
|
237
|
+
|
|
238
|
+
interface ReactNativeCalendarProps extends CalendarProps {
|
|
239
|
+
style?: ViewStyle;
|
|
240
|
+
containerStyle?: ViewStyle;
|
|
241
|
+
headerStyle?: ViewStyle;
|
|
242
|
+
headerTextStyle?: TextStyle;
|
|
243
|
+
cellStyle?: ViewStyle;
|
|
244
|
+
cellTextStyle?: TextStyle;
|
|
245
|
+
renderEvent?: (event: CalendarEvent) => ReactNode;
|
|
246
|
+
renderNoEvents?: () => ReactNode;
|
|
247
|
+
title?: string;
|
|
248
|
+
showCloseButton?: boolean;
|
|
249
|
+
}
|
|
250
|
+
type CalendarComponentProps = ReactNativeCalendarProps;
|
|
251
|
+
interface DatePopupProps {
|
|
252
|
+
visible: boolean;
|
|
253
|
+
selectedDate: Date | null;
|
|
254
|
+
events: CalendarEvent[];
|
|
255
|
+
scheduleDay: string;
|
|
256
|
+
onClose: () => void;
|
|
257
|
+
renderEvent?: (event: CalendarEvent) => ReactNode;
|
|
258
|
+
renderNoEvents?: () => ReactNode;
|
|
259
|
+
showCloseButton?: boolean;
|
|
260
|
+
}
|
|
261
|
+
interface SelectProps {
|
|
262
|
+
options: Array<{
|
|
263
|
+
label: string;
|
|
264
|
+
value: number;
|
|
265
|
+
}>;
|
|
266
|
+
selectedValue: number;
|
|
267
|
+
onValueChange: (value: number) => void;
|
|
268
|
+
style?: ViewStyle;
|
|
269
|
+
textStyle?: TextStyle;
|
|
270
|
+
}
|
|
271
|
+
|
|
272
|
+
declare const Calendar: React.FC<CalendarComponentProps>;
|
|
273
|
+
|
|
274
|
+
declare const DatePopup: React.FC<DatePopupProps>;
|
|
275
|
+
|
|
276
|
+
declare const calendarStyles: {
|
|
277
|
+
container: {
|
|
278
|
+
flex: number;
|
|
279
|
+
backgroundColor: string;
|
|
280
|
+
};
|
|
281
|
+
titleContainer: {
|
|
282
|
+
paddingVertical: number;
|
|
283
|
+
alignItems: "center";
|
|
284
|
+
};
|
|
285
|
+
title: {
|
|
286
|
+
fontSize: number;
|
|
287
|
+
fontWeight: "600";
|
|
288
|
+
color: string;
|
|
289
|
+
};
|
|
290
|
+
contentContainer: {
|
|
291
|
+
marginHorizontal: number;
|
|
292
|
+
marginTop: number;
|
|
293
|
+
};
|
|
294
|
+
card: {
|
|
295
|
+
backgroundColor: string;
|
|
296
|
+
borderRadius: number;
|
|
297
|
+
shadowColor: string;
|
|
298
|
+
shadowOffset: {
|
|
299
|
+
width: number;
|
|
300
|
+
height: number;
|
|
301
|
+
};
|
|
302
|
+
shadowOpacity: number;
|
|
303
|
+
shadowRadius: number;
|
|
304
|
+
elevation: number;
|
|
305
|
+
overflow: "hidden";
|
|
306
|
+
};
|
|
307
|
+
cardHeader: {
|
|
308
|
+
backgroundColor: string;
|
|
309
|
+
paddingVertical: number;
|
|
310
|
+
paddingHorizontal: number;
|
|
311
|
+
borderBottomWidth: number;
|
|
312
|
+
borderBottomColor: string;
|
|
313
|
+
};
|
|
314
|
+
cardHeaderText: {
|
|
315
|
+
fontSize: number;
|
|
316
|
+
fontWeight: "500";
|
|
317
|
+
color: string;
|
|
318
|
+
textAlign: "center";
|
|
319
|
+
};
|
|
320
|
+
table: {
|
|
321
|
+
backgroundColor: string;
|
|
322
|
+
};
|
|
323
|
+
tableHeader: {
|
|
324
|
+
flexDirection: "row";
|
|
325
|
+
backgroundColor: string;
|
|
326
|
+
borderBottomWidth: number;
|
|
327
|
+
borderBottomColor: string;
|
|
328
|
+
};
|
|
329
|
+
tableHeaderCell: {
|
|
330
|
+
flex: number;
|
|
331
|
+
paddingVertical: number;
|
|
332
|
+
borderRightWidth: number;
|
|
333
|
+
borderRightColor: string;
|
|
334
|
+
alignItems: "center";
|
|
335
|
+
justifyContent: "center";
|
|
336
|
+
};
|
|
337
|
+
tableHeaderText: {
|
|
338
|
+
fontSize: number;
|
|
339
|
+
fontWeight: "600";
|
|
340
|
+
color: string;
|
|
341
|
+
};
|
|
342
|
+
tableRow: {
|
|
343
|
+
flexDirection: "row";
|
|
344
|
+
borderBottomWidth: number;
|
|
345
|
+
borderBottomColor: string;
|
|
346
|
+
};
|
|
347
|
+
tableCell: {
|
|
348
|
+
flex: number;
|
|
349
|
+
height: number;
|
|
350
|
+
borderRightWidth: number;
|
|
351
|
+
borderRightColor: string;
|
|
352
|
+
alignItems: "center";
|
|
353
|
+
justifyContent: "center";
|
|
354
|
+
position: "relative";
|
|
355
|
+
};
|
|
356
|
+
tableCellText: {
|
|
357
|
+
fontSize: number;
|
|
358
|
+
color: string;
|
|
359
|
+
};
|
|
360
|
+
cellToday: {
|
|
361
|
+
borderWidth: number;
|
|
362
|
+
borderColor: string;
|
|
363
|
+
};
|
|
364
|
+
cellTodayText: {
|
|
365
|
+
fontWeight: "bold";
|
|
366
|
+
};
|
|
367
|
+
cellWithEvents: {
|
|
368
|
+
backgroundColor: string;
|
|
369
|
+
};
|
|
370
|
+
eventIndicator: {
|
|
371
|
+
position: "absolute";
|
|
372
|
+
bottom: number;
|
|
373
|
+
width: number;
|
|
374
|
+
height: number;
|
|
375
|
+
backgroundColor: string;
|
|
376
|
+
borderRadius: number;
|
|
377
|
+
};
|
|
378
|
+
navigationContainer: {
|
|
379
|
+
flexDirection: "row";
|
|
380
|
+
justifyContent: "space-between";
|
|
381
|
+
paddingHorizontal: number;
|
|
382
|
+
paddingVertical: number;
|
|
383
|
+
gap: number;
|
|
384
|
+
};
|
|
385
|
+
navigationButton: {
|
|
386
|
+
flex: number;
|
|
387
|
+
backgroundColor: string;
|
|
388
|
+
borderWidth: number;
|
|
389
|
+
borderColor: string;
|
|
390
|
+
borderRadius: number;
|
|
391
|
+
paddingVertical: number;
|
|
392
|
+
paddingHorizontal: number;
|
|
393
|
+
alignItems: "center";
|
|
394
|
+
justifyContent: "center";
|
|
395
|
+
};
|
|
396
|
+
navigationButtonText: {
|
|
397
|
+
color: string;
|
|
398
|
+
fontSize: number;
|
|
399
|
+
fontWeight: "500";
|
|
400
|
+
};
|
|
401
|
+
navigationButtonPressed: {
|
|
402
|
+
backgroundColor: string;
|
|
403
|
+
};
|
|
404
|
+
navigationButtonTextPressed: {
|
|
405
|
+
color: string;
|
|
406
|
+
};
|
|
407
|
+
jumpForm: {
|
|
408
|
+
flexDirection: "row";
|
|
409
|
+
alignItems: "center";
|
|
410
|
+
justifyContent: "center";
|
|
411
|
+
paddingHorizontal: number;
|
|
412
|
+
paddingBottom: number;
|
|
413
|
+
gap: number;
|
|
414
|
+
};
|
|
415
|
+
jumpLabel: {
|
|
416
|
+
fontSize: number;
|
|
417
|
+
fontWeight: "300";
|
|
418
|
+
color: string;
|
|
419
|
+
};
|
|
420
|
+
jumpSelect: {
|
|
421
|
+
borderWidth: number;
|
|
422
|
+
borderColor: string;
|
|
423
|
+
borderRadius: number;
|
|
424
|
+
paddingHorizontal: number;
|
|
425
|
+
paddingVertical: number;
|
|
426
|
+
backgroundColor: string;
|
|
427
|
+
minWidth: number;
|
|
428
|
+
};
|
|
429
|
+
jumpSelectText: {
|
|
430
|
+
fontSize: number;
|
|
431
|
+
color: string;
|
|
432
|
+
textAlign: "center";
|
|
433
|
+
};
|
|
434
|
+
popupOverlay: {
|
|
435
|
+
position: "absolute";
|
|
436
|
+
top: number;
|
|
437
|
+
left: number;
|
|
438
|
+
right: number;
|
|
439
|
+
bottom: number;
|
|
440
|
+
backgroundColor: string;
|
|
441
|
+
justifyContent: "center";
|
|
442
|
+
alignItems: "center";
|
|
443
|
+
zIndex: number;
|
|
444
|
+
};
|
|
445
|
+
popup: {
|
|
446
|
+
backgroundColor: string;
|
|
447
|
+
borderRadius: number;
|
|
448
|
+
padding: number;
|
|
449
|
+
width: number;
|
|
450
|
+
maxWidth: number;
|
|
451
|
+
shadowColor: string;
|
|
452
|
+
shadowOffset: {
|
|
453
|
+
width: number;
|
|
454
|
+
height: number;
|
|
455
|
+
};
|
|
456
|
+
shadowOpacity: number;
|
|
457
|
+
shadowRadius: number;
|
|
458
|
+
elevation: number;
|
|
459
|
+
};
|
|
460
|
+
popupWrapper: {
|
|
461
|
+
backgroundColor: string;
|
|
462
|
+
borderRadius: number;
|
|
463
|
+
padding: number;
|
|
464
|
+
};
|
|
465
|
+
popupBlock: {
|
|
466
|
+
backgroundColor: string;
|
|
467
|
+
borderRadius: number;
|
|
468
|
+
paddingVertical: number;
|
|
469
|
+
paddingHorizontal: number;
|
|
470
|
+
marginBottom: number;
|
|
471
|
+
};
|
|
472
|
+
popupDay: {
|
|
473
|
+
fontSize: number;
|
|
474
|
+
fontWeight: "600";
|
|
475
|
+
color: string;
|
|
476
|
+
textAlign: "center";
|
|
477
|
+
};
|
|
478
|
+
eventsList: {
|
|
479
|
+
gap: number;
|
|
480
|
+
};
|
|
481
|
+
eventItem: {
|
|
482
|
+
backgroundColor: string;
|
|
483
|
+
borderRadius: number;
|
|
484
|
+
padding: number;
|
|
485
|
+
};
|
|
486
|
+
eventItemText: {
|
|
487
|
+
fontSize: number;
|
|
488
|
+
color: string;
|
|
489
|
+
};
|
|
490
|
+
noEventsMessage: {
|
|
491
|
+
backgroundColor: string;
|
|
492
|
+
borderRadius: number;
|
|
493
|
+
padding: number;
|
|
494
|
+
alignItems: "center";
|
|
495
|
+
};
|
|
496
|
+
noEventsText: {
|
|
497
|
+
fontSize: number;
|
|
498
|
+
color: string;
|
|
499
|
+
textAlign: "center";
|
|
500
|
+
};
|
|
501
|
+
popupCloseButton: {
|
|
502
|
+
position: "absolute";
|
|
503
|
+
top: number;
|
|
504
|
+
right: number;
|
|
505
|
+
backgroundColor: string;
|
|
506
|
+
borderRadius: number;
|
|
507
|
+
width: number;
|
|
508
|
+
height: number;
|
|
509
|
+
alignItems: "center";
|
|
510
|
+
justifyContent: "center";
|
|
511
|
+
};
|
|
512
|
+
popupCloseText: {
|
|
513
|
+
color: string;
|
|
514
|
+
fontSize: number;
|
|
515
|
+
fontWeight: "bold";
|
|
516
|
+
};
|
|
517
|
+
};
|
|
518
|
+
|
|
519
|
+
declare const index$1_Calendar: typeof Calendar;
|
|
520
|
+
type index$1_CalendarActions = CalendarActions;
|
|
521
|
+
type index$1_CalendarComponentProps = CalendarComponentProps;
|
|
522
|
+
type index$1_CalendarConfig = CalendarConfig;
|
|
523
|
+
type index$1_CalendarDate = CalendarDate;
|
|
524
|
+
type index$1_CalendarEngine = CalendarEngine;
|
|
525
|
+
declare const index$1_CalendarEngine: typeof CalendarEngine;
|
|
526
|
+
type index$1_CalendarEvent = CalendarEvent;
|
|
527
|
+
type index$1_CalendarEventHandler = CalendarEventHandler;
|
|
528
|
+
type index$1_CalendarProps = CalendarProps;
|
|
529
|
+
type index$1_CalendarState = CalendarState;
|
|
530
|
+
type index$1_CalendarViewModel = CalendarViewModel;
|
|
531
|
+
declare const index$1_DAYS: typeof DAYS;
|
|
532
|
+
declare const index$1_DatePopup: typeof DatePopup;
|
|
533
|
+
type index$1_DatePopupProps = DatePopupProps;
|
|
534
|
+
declare const index$1_MONTHS: typeof MONTHS;
|
|
535
|
+
type index$1_PopupPosition = PopupPosition;
|
|
536
|
+
type index$1_ReactNativeCalendarProps = ReactNativeCalendarProps;
|
|
537
|
+
type index$1_SelectProps = SelectProps;
|
|
538
|
+
declare const index$1_calendarStyles: typeof calendarStyles;
|
|
539
|
+
declare const index$1_formatDateForDisplay: typeof formatDateForDisplay;
|
|
540
|
+
declare const index$1_generateCalendarDates: typeof generateCalendarDates;
|
|
541
|
+
declare const index$1_generateYears: typeof generateYears;
|
|
542
|
+
declare const index$1_getCellClasses: typeof getCellClasses;
|
|
543
|
+
declare const index$1_getEventsForDate: typeof getEventsForDate;
|
|
544
|
+
declare const index$1_getMonthYearText: typeof getMonthYearText;
|
|
545
|
+
declare const index$1_getPopupPositionClass: typeof getPopupPositionClass;
|
|
546
|
+
declare const index$1_hasEvents: typeof hasEvents;
|
|
547
|
+
declare const index$1_isSameDay: typeof isSameDay;
|
|
548
|
+
declare const index$1_isToday: typeof isToday;
|
|
549
|
+
declare const index$1_normalizeDate: typeof normalizeDate;
|
|
550
|
+
declare namespace index$1 {
|
|
551
|
+
export { index$1_Calendar as Calendar, type index$1_CalendarActions as CalendarActions, type index$1_CalendarComponentProps as CalendarComponentProps, type index$1_CalendarConfig as CalendarConfig, type index$1_CalendarDate as CalendarDate, index$1_CalendarEngine as CalendarEngine, type index$1_CalendarEvent as CalendarEvent, type index$1_CalendarEventHandler as CalendarEventHandler, type index$1_CalendarProps as CalendarProps, type index$1_CalendarState as CalendarState, type index$1_CalendarViewModel as CalendarViewModel, index$1_DAYS as DAYS, index$1_DatePopup as DatePopup, type index$1_DatePopupProps as DatePopupProps, index$1_MONTHS as MONTHS, type index$1_PopupPosition as PopupPosition, type index$1_ReactNativeCalendarProps as ReactNativeCalendarProps, type index$1_SelectProps as SelectProps, index$1_calendarStyles as calendarStyles, index$1_formatDateForDisplay as formatDateForDisplay, index$1_generateCalendarDates as generateCalendarDates, index$1_generateYears as generateYears, index$1_getCellClasses as getCellClasses, index$1_getEventsForDate as getEventsForDate, index$1_getMonthYearText as getMonthYearText, index$1_getPopupPositionClass as getPopupPositionClass, index$1_hasEvents as hasEvents, index$1_isSameDay as isSameDay, index$1_isToday as isToday, index$1_normalizeDate as normalizeDate };
|
|
552
|
+
}
|
|
553
|
+
|
|
554
|
+
interface VanillaCalendarProps extends CalendarProps {
|
|
555
|
+
container: HTMLElement | string;
|
|
556
|
+
className?: string;
|
|
557
|
+
title?: string;
|
|
558
|
+
renderEvent?: (event: CalendarEvent) => string;
|
|
559
|
+
renderNoEvents?: () => string;
|
|
560
|
+
}
|
|
561
|
+
interface VanillaCalendarInstance {
|
|
562
|
+
destroy: () => void;
|
|
563
|
+
updateEvents: (events: CalendarEvent[]) => void;
|
|
564
|
+
getCurrentDate: () => Date | null;
|
|
565
|
+
goToDate: (date: Date) => void;
|
|
566
|
+
getEngine: () => CalendarEngine;
|
|
567
|
+
}
|
|
568
|
+
|
|
569
|
+
declare class VanillaCalendar implements VanillaCalendarInstance {
|
|
570
|
+
private engine;
|
|
571
|
+
private container;
|
|
572
|
+
private unsubscribe;
|
|
573
|
+
private props;
|
|
574
|
+
private actions;
|
|
575
|
+
constructor(props: VanillaCalendarProps);
|
|
576
|
+
private init;
|
|
577
|
+
private render;
|
|
578
|
+
private attachEventListeners;
|
|
579
|
+
updateEvents(events: CalendarEvent[]): void;
|
|
580
|
+
getCurrentDate(): Date | null;
|
|
581
|
+
goToDate(date: Date): void;
|
|
582
|
+
getEngine(): CalendarEngine;
|
|
583
|
+
destroy(): void;
|
|
584
|
+
}
|
|
585
|
+
declare function createCalendar(props: VanillaCalendarProps): VanillaCalendarInstance;
|
|
586
|
+
|
|
587
|
+
type index_CalendarActions = CalendarActions;
|
|
588
|
+
type index_CalendarConfig = CalendarConfig;
|
|
589
|
+
type index_CalendarDate = CalendarDate;
|
|
590
|
+
type index_CalendarEngine = CalendarEngine;
|
|
591
|
+
declare const index_CalendarEngine: typeof CalendarEngine;
|
|
592
|
+
type index_CalendarEvent = CalendarEvent;
|
|
593
|
+
type index_CalendarEventHandler = CalendarEventHandler;
|
|
594
|
+
type index_CalendarProps = CalendarProps;
|
|
595
|
+
type index_CalendarState = CalendarState;
|
|
596
|
+
type index_CalendarViewModel = CalendarViewModel;
|
|
597
|
+
declare const index_DAYS: typeof DAYS;
|
|
598
|
+
declare const index_MONTHS: typeof MONTHS;
|
|
599
|
+
type index_PopupPosition = PopupPosition;
|
|
600
|
+
type index_VanillaCalendar = VanillaCalendar;
|
|
601
|
+
declare const index_VanillaCalendar: typeof VanillaCalendar;
|
|
602
|
+
type index_VanillaCalendarInstance = VanillaCalendarInstance;
|
|
603
|
+
type index_VanillaCalendarProps = VanillaCalendarProps;
|
|
604
|
+
declare const index_createCalendar: typeof createCalendar;
|
|
605
|
+
declare const index_formatDateForDisplay: typeof formatDateForDisplay;
|
|
606
|
+
declare const index_generateCalendarDates: typeof generateCalendarDates;
|
|
607
|
+
declare const index_generateYears: typeof generateYears;
|
|
608
|
+
declare const index_getCellClasses: typeof getCellClasses;
|
|
609
|
+
declare const index_getEventsForDate: typeof getEventsForDate;
|
|
610
|
+
declare const index_getMonthYearText: typeof getMonthYearText;
|
|
611
|
+
declare const index_getPopupPositionClass: typeof getPopupPositionClass;
|
|
612
|
+
declare const index_hasEvents: typeof hasEvents;
|
|
613
|
+
declare const index_isSameDay: typeof isSameDay;
|
|
614
|
+
declare const index_isToday: typeof isToday;
|
|
615
|
+
declare const index_normalizeDate: typeof normalizeDate;
|
|
616
|
+
declare namespace index {
|
|
617
|
+
export { type index_CalendarActions as CalendarActions, type index_CalendarConfig as CalendarConfig, type index_CalendarDate as CalendarDate, index_CalendarEngine as CalendarEngine, type index_CalendarEvent as CalendarEvent, type index_CalendarEventHandler as CalendarEventHandler, type index_CalendarProps as CalendarProps, type index_CalendarState as CalendarState, type index_CalendarViewModel as CalendarViewModel, index_DAYS as DAYS, index_MONTHS as MONTHS, type index_PopupPosition as PopupPosition, index_VanillaCalendar as VanillaCalendar, type index_VanillaCalendarInstance as VanillaCalendarInstance, type index_VanillaCalendarProps as VanillaCalendarProps, index_createCalendar as createCalendar, index_formatDateForDisplay as formatDateForDisplay, index_generateCalendarDates as generateCalendarDates, index_generateYears as generateYears, index_getCellClasses as getCellClasses, index_getEventsForDate as getEventsForDate, index_getMonthYearText as getMonthYearText, index_getPopupPositionClass as getPopupPositionClass, index_hasEvents as hasEvents, index_isSameDay as isSameDay, index_isToday as isToday, index_normalizeDate as normalizeDate };
|
|
618
|
+
}
|
|
619
|
+
|
|
620
|
+
declare const version = "1.0.0";
|
|
621
|
+
declare const name = "kalendly";
|
|
622
|
+
|
|
623
|
+
export { type CalendarActions, type CalendarConfig, type CalendarDate, CalendarEngine, type CalendarEvent, type CalendarEventHandler, type CalendarProps, type CalendarState, type CalendarViewModel, DAYS, MONTHS, type PopupPosition, index$2 as React, Calendar$1 as ReactCalendar, index$1 as ReactNative, Calendar as ReactNativeCalendar, index as Vanilla, createCalendar as createVanillaCalendar, formatDateForDisplay, generateCalendarDates, generateYears, getCellClasses, getEventsForDate, getMonthYearText, getPopupPositionClass, hasEvents, isSameDay, isToday, name, normalizeDate, version };
|