kalendly 0.1.3 → 0.1.5
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/README.md +232 -5
- package/dist/core/index.d.mts +14 -1
- package/dist/core/index.d.ts +14 -1
- package/dist/index.d.mts +26 -4
- package/dist/index.d.ts +26 -4
- package/dist/index.js +119 -36
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +127 -37
- package/dist/index.mjs.map +1 -1
- package/dist/react/index.d.mts +15 -1
- package/dist/react/index.d.ts +15 -1
- package/dist/react/index.js +32 -1
- package/dist/react/index.js.map +1 -1
- package/dist/react/index.mjs +32 -1
- package/dist/react/index.mjs.map +1 -1
- package/dist/react-native/index.d.mts +15 -1
- package/dist/react-native/index.d.ts +15 -1
- package/dist/react-native/index.js +51 -35
- package/dist/react-native/index.js.map +1 -1
- package/dist/react-native/index.mjs +59 -36
- package/dist/react-native/index.mjs.map +1 -1
- package/dist/styles/calendar.css +16 -4
- package/dist/vanilla/index.d.mts +18 -1
- package/dist/vanilla/index.d.ts +18 -1
- package/dist/vanilla/index.js +36 -0
- package/dist/vanilla/index.js.map +1 -1
- package/dist/vanilla/index.mjs +36 -0
- package/dist/vanilla/index.mjs.map +1 -1
- package/dist/vanilla/index.umd.js +36 -0
- package/dist/vanilla/index.umd.js.map +1 -1
- package/dist/vue/components/Calendar.vue.d.ts +39 -0
- package/dist/vue/components/Calendar.vue.d.ts.map +1 -0
- package/dist/vue/index.d.ts +130 -299
- package/dist/vue/index.d.ts.map +1 -0
- package/dist/vue/index.js +1 -1
- package/dist/vue/index.mjs +226 -207
- package/dist/vue/types.d.ts +21 -0
- package/dist/vue/types.d.ts.map +1 -0
- package/package.json +6 -2
- package/styles.d.ts +1 -0
package/README.md
CHANGED
|
@@ -14,13 +14,27 @@ A universal calendar scheduler component that works seamlessly across React, Vue
|
|
|
14
14
|
- 📦 **Tree Shakeable**: Import only what you need
|
|
15
15
|
- 🎯 **Design Consistent**: Matches the original Vue calendar design and feel
|
|
16
16
|
|
|
17
|
-
## Live
|
|
17
|
+
## 🎯 Live Demo
|
|
18
18
|
|
|
19
|
-
|
|
19
|
+
<div align="center">
|
|
20
20
|
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
21
|
+
[](https://kalendly-example.netlify.app/)
|
|
22
|
+
|
|
23
|
+
**[🚀 Try the Interactive Demo →](https://kalendly-example.netlify.app/)**
|
|
24
|
+
|
|
25
|
+
</div>
|
|
26
|
+
|
|
27
|
+
<p align="center">
|
|
28
|
+
<a href="https://kalendly-example.netlify.app/vanilla">
|
|
29
|
+
<img src="https://img.shields.io/badge/Vanilla_JS-fc8917?style=for-the-badge&logo=javascript&logoColor=white" alt="Vanilla JS Demo"/>
|
|
30
|
+
</a>
|
|
31
|
+
<a href="https://kalendly-example.netlify.app/react">
|
|
32
|
+
<img src="https://img.shields.io/badge/React-61DAFB?style=for-the-badge&logo=react&logoColor=black" alt="React Demo"/>
|
|
33
|
+
</a>
|
|
34
|
+
<a href="https://kalendly-example.netlify.app/vue">
|
|
35
|
+
<img src="https://img.shields.io/badge/Vue-4FC08D?style=for-the-badge&logo=vue.js&logoColor=white" alt="Vue Demo"/>
|
|
36
|
+
</a>
|
|
37
|
+
</p>
|
|
24
38
|
|
|
25
39
|
## Installation
|
|
26
40
|
|
|
@@ -281,6 +295,7 @@ export default App;
|
|
|
281
295
|
| `maxYear` | `number` | `currentYear + 10` | Maximum selectable year |
|
|
282
296
|
| `weekStartsOn` | `0 \| 1` | `0` | Week start day (0 = Sunday, 1 = Monday) |
|
|
283
297
|
| `categoryColors` | `CategoryColorMap` | `{}` | Custom colors for event categories |
|
|
298
|
+
| `theme` | `CalendarTheme` | `undefined` | Custom theme colors for the calendar |
|
|
284
299
|
| `onDateSelect` | `(date: Date) => void` | - | Callback when date is selected |
|
|
285
300
|
| `onEventClick` | `(event: CalendarEvent) => void` | - | Callback when event is clicked |
|
|
286
301
|
| `onMonthChange` | `(year: number, month: number) => void` | - | Callback when month changes |
|
|
@@ -397,6 +412,218 @@ const categoryColors = {
|
|
|
397
412
|
<Calendar events={events} categoryColors={categoryColors} />
|
|
398
413
|
```
|
|
399
414
|
|
|
415
|
+
## Theming
|
|
416
|
+
|
|
417
|
+
Kalendly supports custom theming across all frameworks with a **consistent API**. Customize calendar colors to match your brand or create light/dark themes.
|
|
418
|
+
|
|
419
|
+
### CalendarTheme Interface
|
|
420
|
+
|
|
421
|
+
```typescript
|
|
422
|
+
interface CalendarTheme {
|
|
423
|
+
primary?: string; // Primary brand color
|
|
424
|
+
secondary?: string; // Secondary brand color
|
|
425
|
+
tertiary?: string; // Tertiary/accent color
|
|
426
|
+
textColor?: string; // Main text color
|
|
427
|
+
textLight?: string; // Light/secondary text color
|
|
428
|
+
background?: string; // Background color
|
|
429
|
+
cellHover?: string; // Cell hover state color
|
|
430
|
+
borderColor?: string; // Border color
|
|
431
|
+
todayOutline?: string; // Today indicator color
|
|
432
|
+
selectedBg?: string; // Selected date background
|
|
433
|
+
eventIndicator?: string; // Event indicator dot color
|
|
434
|
+
}
|
|
435
|
+
```
|
|
436
|
+
|
|
437
|
+
### Basic Theme Example
|
|
438
|
+
|
|
439
|
+
**React:**
|
|
440
|
+
|
|
441
|
+
```tsx
|
|
442
|
+
import { Calendar } from 'kalendly/react';
|
|
443
|
+
import 'kalendly/styles';
|
|
444
|
+
|
|
445
|
+
function App() {
|
|
446
|
+
return (
|
|
447
|
+
<Calendar
|
|
448
|
+
events={events}
|
|
449
|
+
theme={{
|
|
450
|
+
primary: '#3b82f6',
|
|
451
|
+
secondary: '#60a5fa',
|
|
452
|
+
tertiary: '#93c5fd',
|
|
453
|
+
borderColor: '#e5e7eb',
|
|
454
|
+
todayOutline: '#fbbf24',
|
|
455
|
+
eventIndicator: '#10b981',
|
|
456
|
+
}}
|
|
457
|
+
/>
|
|
458
|
+
);
|
|
459
|
+
}
|
|
460
|
+
```
|
|
461
|
+
|
|
462
|
+
**Vue:**
|
|
463
|
+
|
|
464
|
+
```vue
|
|
465
|
+
<template>
|
|
466
|
+
<Calendar :events="events" :theme="calendarTheme" />
|
|
467
|
+
</template>
|
|
468
|
+
|
|
469
|
+
<script setup lang="ts">
|
|
470
|
+
import { Calendar } from 'kalendly/vue';
|
|
471
|
+
import 'kalendly/styles';
|
|
472
|
+
|
|
473
|
+
const calendarTheme = {
|
|
474
|
+
primary: '#3b82f6',
|
|
475
|
+
secondary: '#60a5fa',
|
|
476
|
+
tertiary: '#93c5fd',
|
|
477
|
+
borderColor: '#e5e7eb',
|
|
478
|
+
todayOutline: '#fbbf24',
|
|
479
|
+
eventIndicator: '#10b981',
|
|
480
|
+
};
|
|
481
|
+
</script>
|
|
482
|
+
```
|
|
483
|
+
|
|
484
|
+
**Vanilla JavaScript:**
|
|
485
|
+
|
|
486
|
+
```javascript
|
|
487
|
+
import { createCalendar } from 'kalendly/vanilla';
|
|
488
|
+
import 'kalendly/styles';
|
|
489
|
+
|
|
490
|
+
const calendar = createCalendar({
|
|
491
|
+
container: '#calendar',
|
|
492
|
+
events: events,
|
|
493
|
+
theme: {
|
|
494
|
+
primary: '#3b82f6',
|
|
495
|
+
secondary: '#60a5fa',
|
|
496
|
+
tertiary: '#93c5fd',
|
|
497
|
+
borderColor: '#e5e7eb',
|
|
498
|
+
todayOutline: '#fbbf24',
|
|
499
|
+
eventIndicator: '#10b981',
|
|
500
|
+
},
|
|
501
|
+
});
|
|
502
|
+
```
|
|
503
|
+
|
|
504
|
+
**React Native:**
|
|
505
|
+
|
|
506
|
+
```tsx
|
|
507
|
+
import { Calendar } from 'kalendly/react-native';
|
|
508
|
+
|
|
509
|
+
function App() {
|
|
510
|
+
return (
|
|
511
|
+
<Calendar
|
|
512
|
+
events={events}
|
|
513
|
+
theme={{
|
|
514
|
+
primary: '#3b82f6',
|
|
515
|
+
secondary: '#60a5fa',
|
|
516
|
+
tertiary: '#93c5fd',
|
|
517
|
+
borderColor: '#e5e7eb',
|
|
518
|
+
todayOutline: '#fbbf24',
|
|
519
|
+
eventIndicator: '#10b981',
|
|
520
|
+
}}
|
|
521
|
+
/>
|
|
522
|
+
);
|
|
523
|
+
}
|
|
524
|
+
```
|
|
525
|
+
|
|
526
|
+
### Dark Theme Example
|
|
527
|
+
|
|
528
|
+
```typescript
|
|
529
|
+
const darkTheme = {
|
|
530
|
+
primary: '#6366f1',
|
|
531
|
+
secondary: '#818cf8',
|
|
532
|
+
tertiary: '#a5b4fc',
|
|
533
|
+
textColor: '#f9fafb',
|
|
534
|
+
textLight: '#d1d5db',
|
|
535
|
+
background: '#1f2937',
|
|
536
|
+
cellHover: '#374151',
|
|
537
|
+
borderColor: '#4b5563',
|
|
538
|
+
todayOutline: '#fbbf24',
|
|
539
|
+
selectedBg: '#312e81',
|
|
540
|
+
eventIndicator: '#34d399'
|
|
541
|
+
};
|
|
542
|
+
|
|
543
|
+
<Calendar events={events} theme={darkTheme} />
|
|
544
|
+
```
|
|
545
|
+
|
|
546
|
+
### Dynamic Theme Switching
|
|
547
|
+
|
|
548
|
+
**React:**
|
|
549
|
+
|
|
550
|
+
```tsx
|
|
551
|
+
import { useState } from 'react';
|
|
552
|
+
import { Calendar } from 'kalendly/react';
|
|
553
|
+
|
|
554
|
+
const themes = {
|
|
555
|
+
blue: { primary: '#3b82f6', secondary: '#60a5fa' },
|
|
556
|
+
purple: { primary: '#8b5cf6', secondary: '#a78bfa' },
|
|
557
|
+
green: { primary: '#10b981', secondary: '#34d399' },
|
|
558
|
+
};
|
|
559
|
+
|
|
560
|
+
function App() {
|
|
561
|
+
const [currentTheme, setCurrentTheme] = useState('blue');
|
|
562
|
+
|
|
563
|
+
return (
|
|
564
|
+
<>
|
|
565
|
+
<button onClick={() => setCurrentTheme('blue')}>Blue</button>
|
|
566
|
+
<button onClick={() => setCurrentTheme('purple')}>Purple</button>
|
|
567
|
+
<button onClick={() => setCurrentTheme('green')}>Green</button>
|
|
568
|
+
|
|
569
|
+
<Calendar events={events} theme={themes[currentTheme]} />
|
|
570
|
+
</>
|
|
571
|
+
);
|
|
572
|
+
}
|
|
573
|
+
```
|
|
574
|
+
|
|
575
|
+
**Vue:**
|
|
576
|
+
|
|
577
|
+
```vue
|
|
578
|
+
<template>
|
|
579
|
+
<div>
|
|
580
|
+
<button @click="currentTheme = 'blue'">Blue</button>
|
|
581
|
+
<button @click="currentTheme = 'purple'">Purple</button>
|
|
582
|
+
<button @click="currentTheme = 'green'">Green</button>
|
|
583
|
+
|
|
584
|
+
<Calendar :events="events" :theme="themes[currentTheme]" />
|
|
585
|
+
</div>
|
|
586
|
+
</template>
|
|
587
|
+
|
|
588
|
+
<script setup lang="ts">
|
|
589
|
+
import { ref } from 'vue';
|
|
590
|
+
import { Calendar } from 'kalendly/vue';
|
|
591
|
+
|
|
592
|
+
const themes = {
|
|
593
|
+
blue: { primary: '#3b82f6', secondary: '#60a5fa' },
|
|
594
|
+
purple: { primary: '#8b5cf6', secondary: '#a78bfa' },
|
|
595
|
+
green: { primary: '#10b981', secondary: '#34d399' },
|
|
596
|
+
};
|
|
597
|
+
|
|
598
|
+
const currentTheme = ref('blue');
|
|
599
|
+
</script>
|
|
600
|
+
```
|
|
601
|
+
|
|
602
|
+
**Vanilla JavaScript:**
|
|
603
|
+
|
|
604
|
+
```javascript
|
|
605
|
+
import { createCalendar } from 'kalendly/vanilla';
|
|
606
|
+
|
|
607
|
+
const themes = {
|
|
608
|
+
blue: { primary: '#3b82f6', secondary: '#60a5fa' },
|
|
609
|
+
purple: { primary: '#8b5cf6', secondary: '#a78bfa' },
|
|
610
|
+
green: { primary: '#10b981', secondary: '#34d399' },
|
|
611
|
+
};
|
|
612
|
+
|
|
613
|
+
const calendar = createCalendar({
|
|
614
|
+
container: '#calendar',
|
|
615
|
+
events: events,
|
|
616
|
+
theme: themes.blue,
|
|
617
|
+
});
|
|
618
|
+
|
|
619
|
+
// Update theme dynamically without recreation
|
|
620
|
+
document.getElementById('purple-btn').addEventListener('click', () => {
|
|
621
|
+
calendar.updateTheme(themes.purple);
|
|
622
|
+
});
|
|
623
|
+
```
|
|
624
|
+
|
|
625
|
+
> **Note:** The `updateTheme()` method is available in Vanilla JavaScript for efficient theme updates without recreating the calendar instance.
|
|
626
|
+
|
|
400
627
|
## Framework-Specific Features
|
|
401
628
|
|
|
402
629
|
### React Props
|
package/dist/core/index.d.mts
CHANGED
|
@@ -84,6 +84,19 @@ interface CalendarProps {
|
|
|
84
84
|
onEventClick?: CalendarEventHandler;
|
|
85
85
|
onMonthChange?: (year: number, month: number) => void;
|
|
86
86
|
}
|
|
87
|
+
interface CalendarTheme {
|
|
88
|
+
primary?: string;
|
|
89
|
+
secondary?: string;
|
|
90
|
+
tertiary?: string;
|
|
91
|
+
textColor?: string;
|
|
92
|
+
textLight?: string;
|
|
93
|
+
background?: string;
|
|
94
|
+
cellHover?: string;
|
|
95
|
+
borderColor?: string;
|
|
96
|
+
todayOutline?: string;
|
|
97
|
+
selectedBg?: string;
|
|
98
|
+
eventIndicator?: string;
|
|
99
|
+
}
|
|
87
100
|
|
|
88
101
|
declare const MONTHS: string[];
|
|
89
102
|
declare const DAYS: string[];
|
|
@@ -195,4 +208,4 @@ declare class CalendarEngine {
|
|
|
195
208
|
destroy(): void;
|
|
196
209
|
}
|
|
197
210
|
|
|
198
|
-
export { type CalendarActions, type CalendarConfig, type CalendarDate, CalendarEngine, type CalendarEvent, type CalendarEventHandler, type CalendarProps, type CalendarState, type CalendarViewModel, type CategoryColorMap, DAYS, DEFAULT_CATEGORY_COLORS, MONTHS, type PopupPosition, formatAttendees, formatDateForDisplay, formatTimeRange, generateCalendarDates, generateYears, getCategoryColor, getCellClasses, getDefaultEventColor, getEventsForDate, getMonthYearText, getPopupPositionClass, hasEvents, isSameDay, isToday, isValidHexColor, mergeCategoryColors, normalizeDate, sortEventsByTime };
|
|
211
|
+
export { type CalendarActions, type CalendarConfig, type CalendarDate, CalendarEngine, type CalendarEvent, type CalendarEventHandler, type CalendarProps, type CalendarState, type CalendarTheme, type CalendarViewModel, type CategoryColorMap, DAYS, DEFAULT_CATEGORY_COLORS, MONTHS, type PopupPosition, formatAttendees, formatDateForDisplay, formatTimeRange, generateCalendarDates, generateYears, getCategoryColor, getCellClasses, getDefaultEventColor, getEventsForDate, getMonthYearText, getPopupPositionClass, hasEvents, isSameDay, isToday, isValidHexColor, mergeCategoryColors, normalizeDate, sortEventsByTime };
|
package/dist/core/index.d.ts
CHANGED
|
@@ -84,6 +84,19 @@ interface CalendarProps {
|
|
|
84
84
|
onEventClick?: CalendarEventHandler;
|
|
85
85
|
onMonthChange?: (year: number, month: number) => void;
|
|
86
86
|
}
|
|
87
|
+
interface CalendarTheme {
|
|
88
|
+
primary?: string;
|
|
89
|
+
secondary?: string;
|
|
90
|
+
tertiary?: string;
|
|
91
|
+
textColor?: string;
|
|
92
|
+
textLight?: string;
|
|
93
|
+
background?: string;
|
|
94
|
+
cellHover?: string;
|
|
95
|
+
borderColor?: string;
|
|
96
|
+
todayOutline?: string;
|
|
97
|
+
selectedBg?: string;
|
|
98
|
+
eventIndicator?: string;
|
|
99
|
+
}
|
|
87
100
|
|
|
88
101
|
declare const MONTHS: string[];
|
|
89
102
|
declare const DAYS: string[];
|
|
@@ -195,4 +208,4 @@ declare class CalendarEngine {
|
|
|
195
208
|
destroy(): void;
|
|
196
209
|
}
|
|
197
210
|
|
|
198
|
-
export { type CalendarActions, type CalendarConfig, type CalendarDate, CalendarEngine, type CalendarEvent, type CalendarEventHandler, type CalendarProps, type CalendarState, type CalendarViewModel, type CategoryColorMap, DAYS, DEFAULT_CATEGORY_COLORS, MONTHS, type PopupPosition, formatAttendees, formatDateForDisplay, formatTimeRange, generateCalendarDates, generateYears, getCategoryColor, getCellClasses, getDefaultEventColor, getEventsForDate, getMonthYearText, getPopupPositionClass, hasEvents, isSameDay, isToday, isValidHexColor, mergeCategoryColors, normalizeDate, sortEventsByTime };
|
|
211
|
+
export { type CalendarActions, type CalendarConfig, type CalendarDate, CalendarEngine, type CalendarEvent, type CalendarEventHandler, type CalendarProps, type CalendarState, type CalendarTheme, type CalendarViewModel, type CategoryColorMap, DAYS, DEFAULT_CATEGORY_COLORS, MONTHS, type PopupPosition, formatAttendees, formatDateForDisplay, formatTimeRange, generateCalendarDates, generateYears, getCategoryColor, getCellClasses, getDefaultEventColor, getEventsForDate, getMonthYearText, getPopupPositionClass, hasEvents, isSameDay, isToday, isValidHexColor, mergeCategoryColors, normalizeDate, sortEventsByTime };
|
package/dist/index.d.mts
CHANGED
|
@@ -87,6 +87,19 @@ interface CalendarProps {
|
|
|
87
87
|
onEventClick?: CalendarEventHandler;
|
|
88
88
|
onMonthChange?: (year: number, month: number) => void;
|
|
89
89
|
}
|
|
90
|
+
interface CalendarTheme {
|
|
91
|
+
primary?: string;
|
|
92
|
+
secondary?: string;
|
|
93
|
+
tertiary?: string;
|
|
94
|
+
textColor?: string;
|
|
95
|
+
textLight?: string;
|
|
96
|
+
background?: string;
|
|
97
|
+
cellHover?: string;
|
|
98
|
+
borderColor?: string;
|
|
99
|
+
todayOutline?: string;
|
|
100
|
+
selectedBg?: string;
|
|
101
|
+
eventIndicator?: string;
|
|
102
|
+
}
|
|
90
103
|
|
|
91
104
|
declare const MONTHS: string[];
|
|
92
105
|
declare const DAYS: string[];
|
|
@@ -205,6 +218,7 @@ interface ReactCalendarProps extends CalendarProps {
|
|
|
205
218
|
renderEvent?: (event: CalendarEvent) => ReactNode;
|
|
206
219
|
renderNoEvents?: () => ReactNode;
|
|
207
220
|
title?: string;
|
|
221
|
+
theme?: CalendarTheme;
|
|
208
222
|
}
|
|
209
223
|
type CalendarComponentProps$1 = ReactCalendarProps;
|
|
210
224
|
interface DatePopupProps$1 {
|
|
@@ -232,6 +246,7 @@ type index$2_CalendarEvent = CalendarEvent;
|
|
|
232
246
|
type index$2_CalendarEventHandler = CalendarEventHandler;
|
|
233
247
|
type index$2_CalendarProps = CalendarProps;
|
|
234
248
|
type index$2_CalendarState = CalendarState;
|
|
249
|
+
type index$2_CalendarTheme = CalendarTheme;
|
|
235
250
|
type index$2_CalendarViewModel = CalendarViewModel;
|
|
236
251
|
type index$2_CategoryColorMap = CategoryColorMap;
|
|
237
252
|
declare const index$2_DAYS: typeof DAYS;
|
|
@@ -258,7 +273,7 @@ declare const index$2_mergeCategoryColors: typeof mergeCategoryColors;
|
|
|
258
273
|
declare const index$2_normalizeDate: typeof normalizeDate;
|
|
259
274
|
declare const index$2_sortEventsByTime: typeof sortEventsByTime;
|
|
260
275
|
declare namespace index$2 {
|
|
261
|
-
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, type index$2_CategoryColorMap as CategoryColorMap, index$2_DAYS as DAYS, index$2_DEFAULT_CATEGORY_COLORS as DEFAULT_CATEGORY_COLORS, 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_formatAttendees as formatAttendees, index$2_formatDateForDisplay as formatDateForDisplay, index$2_formatTimeRange as formatTimeRange, index$2_generateCalendarDates as generateCalendarDates, index$2_generateYears as generateYears, index$2_getCategoryColor as getCategoryColor, index$2_getCellClasses as getCellClasses, index$2_getDefaultEventColor as getDefaultEventColor, 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_isValidHexColor as isValidHexColor, index$2_mergeCategoryColors as mergeCategoryColors, index$2_normalizeDate as normalizeDate, index$2_sortEventsByTime as sortEventsByTime };
|
|
276
|
+
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_CalendarTheme as CalendarTheme, type index$2_CalendarViewModel as CalendarViewModel, type index$2_CategoryColorMap as CategoryColorMap, index$2_DAYS as DAYS, index$2_DEFAULT_CATEGORY_COLORS as DEFAULT_CATEGORY_COLORS, 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_formatAttendees as formatAttendees, index$2_formatDateForDisplay as formatDateForDisplay, index$2_formatTimeRange as formatTimeRange, index$2_generateCalendarDates as generateCalendarDates, index$2_generateYears as generateYears, index$2_getCategoryColor as getCategoryColor, index$2_getCellClasses as getCellClasses, index$2_getDefaultEventColor as getDefaultEventColor, 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_isValidHexColor as isValidHexColor, index$2_mergeCategoryColors as mergeCategoryColors, index$2_normalizeDate as normalizeDate, index$2_sortEventsByTime as sortEventsByTime };
|
|
262
277
|
}
|
|
263
278
|
|
|
264
279
|
interface ReactNativeCalendarProps extends CalendarProps {
|
|
@@ -272,6 +287,7 @@ interface ReactNativeCalendarProps extends CalendarProps {
|
|
|
272
287
|
renderNoEvents?: () => ReactNode;
|
|
273
288
|
title?: string;
|
|
274
289
|
showCloseButton?: boolean;
|
|
290
|
+
theme?: CalendarTheme;
|
|
275
291
|
}
|
|
276
292
|
type CalendarComponentProps = ReactNativeCalendarProps;
|
|
277
293
|
interface DatePopupProps {
|
|
@@ -686,6 +702,7 @@ type index$1_CalendarEvent = CalendarEvent;
|
|
|
686
702
|
type index$1_CalendarEventHandler = CalendarEventHandler;
|
|
687
703
|
type index$1_CalendarProps = CalendarProps;
|
|
688
704
|
type index$1_CalendarState = CalendarState;
|
|
705
|
+
type index$1_CalendarTheme = CalendarTheme;
|
|
689
706
|
type index$1_CalendarViewModel = CalendarViewModel;
|
|
690
707
|
type index$1_CategoryColorMap = CategoryColorMap;
|
|
691
708
|
declare const index$1_DAYS: typeof DAYS;
|
|
@@ -716,7 +733,7 @@ declare const index$1_mergeCategoryColors: typeof mergeCategoryColors;
|
|
|
716
733
|
declare const index$1_normalizeDate: typeof normalizeDate;
|
|
717
734
|
declare const index$1_sortEventsByTime: typeof sortEventsByTime;
|
|
718
735
|
declare namespace index$1 {
|
|
719
|
-
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, type index$1_CategoryColorMap as CategoryColorMap, index$1_DAYS as DAYS, index$1_DEFAULT_CATEGORY_COLORS as DEFAULT_CATEGORY_COLORS, 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_formatAttendees as formatAttendees, index$1_formatDateForDisplay as formatDateForDisplay, index$1_formatTimeRange as formatTimeRange, index$1_generateCalendarDates as generateCalendarDates, index$1_generateYears as generateYears, index$1_getCategoryColor as getCategoryColor, index$1_getCellClasses as getCellClasses, index$1_getDefaultEventColor as getDefaultEventColor, 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_isValidHexColor as isValidHexColor, index$1_mergeCategoryColors as mergeCategoryColors, index$1_normalizeDate as normalizeDate, index$1_sortEventsByTime as sortEventsByTime };
|
|
736
|
+
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_CalendarTheme as CalendarTheme, type index$1_CalendarViewModel as CalendarViewModel, type index$1_CategoryColorMap as CategoryColorMap, index$1_DAYS as DAYS, index$1_DEFAULT_CATEGORY_COLORS as DEFAULT_CATEGORY_COLORS, 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_formatAttendees as formatAttendees, index$1_formatDateForDisplay as formatDateForDisplay, index$1_formatTimeRange as formatTimeRange, index$1_generateCalendarDates as generateCalendarDates, index$1_generateYears as generateYears, index$1_getCategoryColor as getCategoryColor, index$1_getCellClasses as getCellClasses, index$1_getDefaultEventColor as getDefaultEventColor, 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_isValidHexColor as isValidHexColor, index$1_mergeCategoryColors as mergeCategoryColors, index$1_normalizeDate as normalizeDate, index$1_sortEventsByTime as sortEventsByTime };
|
|
720
737
|
}
|
|
721
738
|
|
|
722
739
|
interface VanillaCalendarProps extends CalendarProps {
|
|
@@ -725,10 +742,12 @@ interface VanillaCalendarProps extends CalendarProps {
|
|
|
725
742
|
title?: string;
|
|
726
743
|
renderEvent?: (event: CalendarEvent) => string;
|
|
727
744
|
renderNoEvents?: () => string;
|
|
745
|
+
theme?: CalendarTheme;
|
|
728
746
|
}
|
|
729
747
|
interface VanillaCalendarInstance {
|
|
730
748
|
destroy: () => void;
|
|
731
749
|
updateEvents: (events: CalendarEvent[]) => void;
|
|
750
|
+
updateTheme: (theme: CalendarTheme) => void;
|
|
732
751
|
getCurrentDate: () => Date | null;
|
|
733
752
|
goToDate: (date: Date) => void;
|
|
734
753
|
getEngine: () => CalendarEngine;
|
|
@@ -741,10 +760,12 @@ declare class VanillaCalendar implements VanillaCalendarInstance {
|
|
|
741
760
|
private props;
|
|
742
761
|
private actions;
|
|
743
762
|
constructor(props: VanillaCalendarProps);
|
|
763
|
+
private applyTheme;
|
|
744
764
|
private init;
|
|
745
765
|
private render;
|
|
746
766
|
private attachEventListeners;
|
|
747
767
|
updateEvents(events: CalendarEvent[]): void;
|
|
768
|
+
updateTheme(theme: CalendarTheme): void;
|
|
748
769
|
getCurrentDate(): Date | null;
|
|
749
770
|
goToDate(date: Date): void;
|
|
750
771
|
getEngine(): CalendarEngine;
|
|
@@ -761,6 +782,7 @@ type index_CalendarEvent = CalendarEvent;
|
|
|
761
782
|
type index_CalendarEventHandler = CalendarEventHandler;
|
|
762
783
|
type index_CalendarProps = CalendarProps;
|
|
763
784
|
type index_CalendarState = CalendarState;
|
|
785
|
+
type index_CalendarTheme = CalendarTheme;
|
|
764
786
|
type index_CalendarViewModel = CalendarViewModel;
|
|
765
787
|
type index_CategoryColorMap = CategoryColorMap;
|
|
766
788
|
declare const index_DAYS: typeof DAYS;
|
|
@@ -791,10 +813,10 @@ declare const index_mergeCategoryColors: typeof mergeCategoryColors;
|
|
|
791
813
|
declare const index_normalizeDate: typeof normalizeDate;
|
|
792
814
|
declare const index_sortEventsByTime: typeof sortEventsByTime;
|
|
793
815
|
declare namespace index {
|
|
794
|
-
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, type index_CategoryColorMap as CategoryColorMap, index_DAYS as DAYS, index_DEFAULT_CATEGORY_COLORS as DEFAULT_CATEGORY_COLORS, 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_formatAttendees as formatAttendees, index_formatDateForDisplay as formatDateForDisplay, index_formatTimeRange as formatTimeRange, index_generateCalendarDates as generateCalendarDates, index_generateYears as generateYears, index_getCategoryColor as getCategoryColor, index_getCellClasses as getCellClasses, index_getDefaultEventColor as getDefaultEventColor, 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_isValidHexColor as isValidHexColor, index_mergeCategoryColors as mergeCategoryColors, index_normalizeDate as normalizeDate, index_sortEventsByTime as sortEventsByTime };
|
|
816
|
+
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_CalendarTheme as CalendarTheme, type index_CalendarViewModel as CalendarViewModel, type index_CategoryColorMap as CategoryColorMap, index_DAYS as DAYS, index_DEFAULT_CATEGORY_COLORS as DEFAULT_CATEGORY_COLORS, 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_formatAttendees as formatAttendees, index_formatDateForDisplay as formatDateForDisplay, index_formatTimeRange as formatTimeRange, index_generateCalendarDates as generateCalendarDates, index_generateYears as generateYears, index_getCategoryColor as getCategoryColor, index_getCellClasses as getCellClasses, index_getDefaultEventColor as getDefaultEventColor, 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_isValidHexColor as isValidHexColor, index_mergeCategoryColors as mergeCategoryColors, index_normalizeDate as normalizeDate, index_sortEventsByTime as sortEventsByTime };
|
|
795
817
|
}
|
|
796
818
|
|
|
797
819
|
declare const version = "1.0.0";
|
|
798
820
|
declare const name = "kalendly";
|
|
799
821
|
|
|
800
|
-
export { type CalendarActions, type CalendarConfig, type CalendarDate, CalendarEngine, type CalendarEvent, type CalendarEventHandler, type CalendarProps, type CalendarState, type CalendarViewModel, type CategoryColorMap, DAYS, DEFAULT_CATEGORY_COLORS, MONTHS, type PopupPosition, index$2 as React, Calendar$1 as ReactCalendar, index$1 as ReactNative, Calendar as ReactNativeCalendar, index as Vanilla, createCalendar as createVanillaCalendar, formatAttendees, formatDateForDisplay, formatTimeRange, generateCalendarDates, generateYears, getCategoryColor, getCellClasses, getDefaultEventColor, getEventsForDate, getMonthYearText, getPopupPositionClass, hasEvents, isSameDay, isToday, isValidHexColor, mergeCategoryColors, name, normalizeDate, sortEventsByTime, version };
|
|
822
|
+
export { type CalendarActions, type CalendarConfig, type CalendarDate, CalendarEngine, type CalendarEvent, type CalendarEventHandler, type CalendarProps, type CalendarState, type CalendarTheme, type CalendarViewModel, type CategoryColorMap, DAYS, DEFAULT_CATEGORY_COLORS, MONTHS, type PopupPosition, index$2 as React, Calendar$1 as ReactCalendar, index$1 as ReactNative, Calendar as ReactNativeCalendar, index as Vanilla, createCalendar as createVanillaCalendar, formatAttendees, formatDateForDisplay, formatTimeRange, generateCalendarDates, generateYears, getCategoryColor, getCellClasses, getDefaultEventColor, getEventsForDate, getMonthYearText, getPopupPositionClass, hasEvents, isSameDay, isToday, isValidHexColor, mergeCategoryColors, name, normalizeDate, sortEventsByTime, version };
|
package/dist/index.d.ts
CHANGED
|
@@ -87,6 +87,19 @@ interface CalendarProps {
|
|
|
87
87
|
onEventClick?: CalendarEventHandler;
|
|
88
88
|
onMonthChange?: (year: number, month: number) => void;
|
|
89
89
|
}
|
|
90
|
+
interface CalendarTheme {
|
|
91
|
+
primary?: string;
|
|
92
|
+
secondary?: string;
|
|
93
|
+
tertiary?: string;
|
|
94
|
+
textColor?: string;
|
|
95
|
+
textLight?: string;
|
|
96
|
+
background?: string;
|
|
97
|
+
cellHover?: string;
|
|
98
|
+
borderColor?: string;
|
|
99
|
+
todayOutline?: string;
|
|
100
|
+
selectedBg?: string;
|
|
101
|
+
eventIndicator?: string;
|
|
102
|
+
}
|
|
90
103
|
|
|
91
104
|
declare const MONTHS: string[];
|
|
92
105
|
declare const DAYS: string[];
|
|
@@ -205,6 +218,7 @@ interface ReactCalendarProps extends CalendarProps {
|
|
|
205
218
|
renderEvent?: (event: CalendarEvent) => ReactNode;
|
|
206
219
|
renderNoEvents?: () => ReactNode;
|
|
207
220
|
title?: string;
|
|
221
|
+
theme?: CalendarTheme;
|
|
208
222
|
}
|
|
209
223
|
type CalendarComponentProps$1 = ReactCalendarProps;
|
|
210
224
|
interface DatePopupProps$1 {
|
|
@@ -232,6 +246,7 @@ type index$2_CalendarEvent = CalendarEvent;
|
|
|
232
246
|
type index$2_CalendarEventHandler = CalendarEventHandler;
|
|
233
247
|
type index$2_CalendarProps = CalendarProps;
|
|
234
248
|
type index$2_CalendarState = CalendarState;
|
|
249
|
+
type index$2_CalendarTheme = CalendarTheme;
|
|
235
250
|
type index$2_CalendarViewModel = CalendarViewModel;
|
|
236
251
|
type index$2_CategoryColorMap = CategoryColorMap;
|
|
237
252
|
declare const index$2_DAYS: typeof DAYS;
|
|
@@ -258,7 +273,7 @@ declare const index$2_mergeCategoryColors: typeof mergeCategoryColors;
|
|
|
258
273
|
declare const index$2_normalizeDate: typeof normalizeDate;
|
|
259
274
|
declare const index$2_sortEventsByTime: typeof sortEventsByTime;
|
|
260
275
|
declare namespace index$2 {
|
|
261
|
-
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, type index$2_CategoryColorMap as CategoryColorMap, index$2_DAYS as DAYS, index$2_DEFAULT_CATEGORY_COLORS as DEFAULT_CATEGORY_COLORS, 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_formatAttendees as formatAttendees, index$2_formatDateForDisplay as formatDateForDisplay, index$2_formatTimeRange as formatTimeRange, index$2_generateCalendarDates as generateCalendarDates, index$2_generateYears as generateYears, index$2_getCategoryColor as getCategoryColor, index$2_getCellClasses as getCellClasses, index$2_getDefaultEventColor as getDefaultEventColor, 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_isValidHexColor as isValidHexColor, index$2_mergeCategoryColors as mergeCategoryColors, index$2_normalizeDate as normalizeDate, index$2_sortEventsByTime as sortEventsByTime };
|
|
276
|
+
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_CalendarTheme as CalendarTheme, type index$2_CalendarViewModel as CalendarViewModel, type index$2_CategoryColorMap as CategoryColorMap, index$2_DAYS as DAYS, index$2_DEFAULT_CATEGORY_COLORS as DEFAULT_CATEGORY_COLORS, 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_formatAttendees as formatAttendees, index$2_formatDateForDisplay as formatDateForDisplay, index$2_formatTimeRange as formatTimeRange, index$2_generateCalendarDates as generateCalendarDates, index$2_generateYears as generateYears, index$2_getCategoryColor as getCategoryColor, index$2_getCellClasses as getCellClasses, index$2_getDefaultEventColor as getDefaultEventColor, 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_isValidHexColor as isValidHexColor, index$2_mergeCategoryColors as mergeCategoryColors, index$2_normalizeDate as normalizeDate, index$2_sortEventsByTime as sortEventsByTime };
|
|
262
277
|
}
|
|
263
278
|
|
|
264
279
|
interface ReactNativeCalendarProps extends CalendarProps {
|
|
@@ -272,6 +287,7 @@ interface ReactNativeCalendarProps extends CalendarProps {
|
|
|
272
287
|
renderNoEvents?: () => ReactNode;
|
|
273
288
|
title?: string;
|
|
274
289
|
showCloseButton?: boolean;
|
|
290
|
+
theme?: CalendarTheme;
|
|
275
291
|
}
|
|
276
292
|
type CalendarComponentProps = ReactNativeCalendarProps;
|
|
277
293
|
interface DatePopupProps {
|
|
@@ -686,6 +702,7 @@ type index$1_CalendarEvent = CalendarEvent;
|
|
|
686
702
|
type index$1_CalendarEventHandler = CalendarEventHandler;
|
|
687
703
|
type index$1_CalendarProps = CalendarProps;
|
|
688
704
|
type index$1_CalendarState = CalendarState;
|
|
705
|
+
type index$1_CalendarTheme = CalendarTheme;
|
|
689
706
|
type index$1_CalendarViewModel = CalendarViewModel;
|
|
690
707
|
type index$1_CategoryColorMap = CategoryColorMap;
|
|
691
708
|
declare const index$1_DAYS: typeof DAYS;
|
|
@@ -716,7 +733,7 @@ declare const index$1_mergeCategoryColors: typeof mergeCategoryColors;
|
|
|
716
733
|
declare const index$1_normalizeDate: typeof normalizeDate;
|
|
717
734
|
declare const index$1_sortEventsByTime: typeof sortEventsByTime;
|
|
718
735
|
declare namespace index$1 {
|
|
719
|
-
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, type index$1_CategoryColorMap as CategoryColorMap, index$1_DAYS as DAYS, index$1_DEFAULT_CATEGORY_COLORS as DEFAULT_CATEGORY_COLORS, 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_formatAttendees as formatAttendees, index$1_formatDateForDisplay as formatDateForDisplay, index$1_formatTimeRange as formatTimeRange, index$1_generateCalendarDates as generateCalendarDates, index$1_generateYears as generateYears, index$1_getCategoryColor as getCategoryColor, index$1_getCellClasses as getCellClasses, index$1_getDefaultEventColor as getDefaultEventColor, 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_isValidHexColor as isValidHexColor, index$1_mergeCategoryColors as mergeCategoryColors, index$1_normalizeDate as normalizeDate, index$1_sortEventsByTime as sortEventsByTime };
|
|
736
|
+
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_CalendarTheme as CalendarTheme, type index$1_CalendarViewModel as CalendarViewModel, type index$1_CategoryColorMap as CategoryColorMap, index$1_DAYS as DAYS, index$1_DEFAULT_CATEGORY_COLORS as DEFAULT_CATEGORY_COLORS, 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_formatAttendees as formatAttendees, index$1_formatDateForDisplay as formatDateForDisplay, index$1_formatTimeRange as formatTimeRange, index$1_generateCalendarDates as generateCalendarDates, index$1_generateYears as generateYears, index$1_getCategoryColor as getCategoryColor, index$1_getCellClasses as getCellClasses, index$1_getDefaultEventColor as getDefaultEventColor, 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_isValidHexColor as isValidHexColor, index$1_mergeCategoryColors as mergeCategoryColors, index$1_normalizeDate as normalizeDate, index$1_sortEventsByTime as sortEventsByTime };
|
|
720
737
|
}
|
|
721
738
|
|
|
722
739
|
interface VanillaCalendarProps extends CalendarProps {
|
|
@@ -725,10 +742,12 @@ interface VanillaCalendarProps extends CalendarProps {
|
|
|
725
742
|
title?: string;
|
|
726
743
|
renderEvent?: (event: CalendarEvent) => string;
|
|
727
744
|
renderNoEvents?: () => string;
|
|
745
|
+
theme?: CalendarTheme;
|
|
728
746
|
}
|
|
729
747
|
interface VanillaCalendarInstance {
|
|
730
748
|
destroy: () => void;
|
|
731
749
|
updateEvents: (events: CalendarEvent[]) => void;
|
|
750
|
+
updateTheme: (theme: CalendarTheme) => void;
|
|
732
751
|
getCurrentDate: () => Date | null;
|
|
733
752
|
goToDate: (date: Date) => void;
|
|
734
753
|
getEngine: () => CalendarEngine;
|
|
@@ -741,10 +760,12 @@ declare class VanillaCalendar implements VanillaCalendarInstance {
|
|
|
741
760
|
private props;
|
|
742
761
|
private actions;
|
|
743
762
|
constructor(props: VanillaCalendarProps);
|
|
763
|
+
private applyTheme;
|
|
744
764
|
private init;
|
|
745
765
|
private render;
|
|
746
766
|
private attachEventListeners;
|
|
747
767
|
updateEvents(events: CalendarEvent[]): void;
|
|
768
|
+
updateTheme(theme: CalendarTheme): void;
|
|
748
769
|
getCurrentDate(): Date | null;
|
|
749
770
|
goToDate(date: Date): void;
|
|
750
771
|
getEngine(): CalendarEngine;
|
|
@@ -761,6 +782,7 @@ type index_CalendarEvent = CalendarEvent;
|
|
|
761
782
|
type index_CalendarEventHandler = CalendarEventHandler;
|
|
762
783
|
type index_CalendarProps = CalendarProps;
|
|
763
784
|
type index_CalendarState = CalendarState;
|
|
785
|
+
type index_CalendarTheme = CalendarTheme;
|
|
764
786
|
type index_CalendarViewModel = CalendarViewModel;
|
|
765
787
|
type index_CategoryColorMap = CategoryColorMap;
|
|
766
788
|
declare const index_DAYS: typeof DAYS;
|
|
@@ -791,10 +813,10 @@ declare const index_mergeCategoryColors: typeof mergeCategoryColors;
|
|
|
791
813
|
declare const index_normalizeDate: typeof normalizeDate;
|
|
792
814
|
declare const index_sortEventsByTime: typeof sortEventsByTime;
|
|
793
815
|
declare namespace index {
|
|
794
|
-
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, type index_CategoryColorMap as CategoryColorMap, index_DAYS as DAYS, index_DEFAULT_CATEGORY_COLORS as DEFAULT_CATEGORY_COLORS, 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_formatAttendees as formatAttendees, index_formatDateForDisplay as formatDateForDisplay, index_formatTimeRange as formatTimeRange, index_generateCalendarDates as generateCalendarDates, index_generateYears as generateYears, index_getCategoryColor as getCategoryColor, index_getCellClasses as getCellClasses, index_getDefaultEventColor as getDefaultEventColor, 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_isValidHexColor as isValidHexColor, index_mergeCategoryColors as mergeCategoryColors, index_normalizeDate as normalizeDate, index_sortEventsByTime as sortEventsByTime };
|
|
816
|
+
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_CalendarTheme as CalendarTheme, type index_CalendarViewModel as CalendarViewModel, type index_CategoryColorMap as CategoryColorMap, index_DAYS as DAYS, index_DEFAULT_CATEGORY_COLORS as DEFAULT_CATEGORY_COLORS, 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_formatAttendees as formatAttendees, index_formatDateForDisplay as formatDateForDisplay, index_formatTimeRange as formatTimeRange, index_generateCalendarDates as generateCalendarDates, index_generateYears as generateYears, index_getCategoryColor as getCategoryColor, index_getCellClasses as getCellClasses, index_getDefaultEventColor as getDefaultEventColor, 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_isValidHexColor as isValidHexColor, index_mergeCategoryColors as mergeCategoryColors, index_normalizeDate as normalizeDate, index_sortEventsByTime as sortEventsByTime };
|
|
795
817
|
}
|
|
796
818
|
|
|
797
819
|
declare const version = "1.0.0";
|
|
798
820
|
declare const name = "kalendly";
|
|
799
821
|
|
|
800
|
-
export { type CalendarActions, type CalendarConfig, type CalendarDate, CalendarEngine, type CalendarEvent, type CalendarEventHandler, type CalendarProps, type CalendarState, type CalendarViewModel, type CategoryColorMap, DAYS, DEFAULT_CATEGORY_COLORS, MONTHS, type PopupPosition, index$2 as React, Calendar$1 as ReactCalendar, index$1 as ReactNative, Calendar as ReactNativeCalendar, index as Vanilla, createCalendar as createVanillaCalendar, formatAttendees, formatDateForDisplay, formatTimeRange, generateCalendarDates, generateYears, getCategoryColor, getCellClasses, getDefaultEventColor, getEventsForDate, getMonthYearText, getPopupPositionClass, hasEvents, isSameDay, isToday, isValidHexColor, mergeCategoryColors, name, normalizeDate, sortEventsByTime, version };
|
|
822
|
+
export { type CalendarActions, type CalendarConfig, type CalendarDate, CalendarEngine, type CalendarEvent, type CalendarEventHandler, type CalendarProps, type CalendarState, type CalendarTheme, type CalendarViewModel, type CategoryColorMap, DAYS, DEFAULT_CATEGORY_COLORS, MONTHS, type PopupPosition, index$2 as React, Calendar$1 as ReactCalendar, index$1 as ReactNative, Calendar as ReactNativeCalendar, index as Vanilla, createCalendar as createVanillaCalendar, formatAttendees, formatDateForDisplay, formatTimeRange, generateCalendarDates, generateYears, getCategoryColor, getCellClasses, getDefaultEventColor, getEventsForDate, getMonthYearText, getPopupPositionClass, hasEvents, isSameDay, isToday, isValidHexColor, mergeCategoryColors, name, normalizeDate, sortEventsByTime, version };
|