kalendly 0.1.7 → 0.2.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 (38) hide show
  1. package/README.md +317 -681
  2. package/dist/core/index.js +3 -3
  3. package/dist/index.d.mts +48 -602
  4. package/dist/index.d.ts +48 -602
  5. package/dist/index.js +753 -2359
  6. package/dist/index.js.map +1 -1
  7. package/dist/index.mjs +727 -2348
  8. package/dist/index.mjs.map +1 -1
  9. package/dist/{vanilla/index.umd.js → index.umd.js} +218 -218
  10. package/dist/index.umd.js.map +1 -0
  11. package/package.json +41 -91
  12. package/dist/react/index.d.mts +0 -251
  13. package/dist/react/index.d.ts +0 -251
  14. package/dist/react/index.js +0 -969
  15. package/dist/react/index.js.map +0 -1
  16. package/dist/react/index.mjs +0 -924
  17. package/dist/react/index.mjs.map +0 -1
  18. package/dist/react-native/index.d.mts +0 -642
  19. package/dist/react-native/index.d.ts +0 -642
  20. package/dist/react-native/index.js +0 -1649
  21. package/dist/react-native/index.js.map +0 -1
  22. package/dist/react-native/index.mjs +0 -1615
  23. package/dist/react-native/index.mjs.map +0 -1
  24. package/dist/vanilla/index.d.mts +0 -271
  25. package/dist/vanilla/index.d.ts +0 -271
  26. package/dist/vanilla/index.js +0 -1064
  27. package/dist/vanilla/index.js.map +0 -1
  28. package/dist/vanilla/index.mjs +0 -1013
  29. package/dist/vanilla/index.mjs.map +0 -1
  30. package/dist/vanilla/index.umd.js.map +0 -1
  31. package/dist/vue/components/Calendar.vue.d.ts +0 -43
  32. package/dist/vue/components/Calendar.vue.d.ts.map +0 -1
  33. package/dist/vue/index.d.ts +0 -134
  34. package/dist/vue/index.d.ts.map +0 -1
  35. package/dist/vue/index.js +0 -1
  36. package/dist/vue/index.mjs +0 -717
  37. package/dist/vue/types.d.ts +0 -21
  38. package/dist/vue/types.d.ts.map +0 -1
package/dist/index.d.ts CHANGED
@@ -1,6 +1,3 @@
1
- import React, { CSSProperties, ReactNode } from 'react';
2
- import { ViewStyle, TextStyle } from 'react-native';
3
-
4
1
  interface CalendarEvent {
5
2
  id: string | number;
6
3
  name: string;
@@ -223,569 +220,40 @@ declare class CalendarEngine {
223
220
  destroy(): void;
224
221
  }
225
222
 
226
- interface ReactCalendarProps extends CalendarProps {
227
- className?: string;
228
- style?: CSSProperties;
229
- children?: ReactNode;
230
- renderEvent?: (event: CalendarEvent) => ReactNode;
231
- renderNoEvents?: () => ReactNode;
232
- title?: string;
233
- theme?: CalendarTheme;
234
- }
235
- type CalendarComponentProps$1 = ReactCalendarProps;
236
- interface DatePopupProps$1 {
237
- isVisible: boolean;
238
- selectedDate: Date | null;
239
- events: CalendarEvent[];
240
- scheduleDay: string;
241
- popupPositionClass: string;
242
- onClose?: () => void;
243
- onEventClick?: (event: CalendarEvent) => void;
244
- renderEvent?: (event: CalendarEvent) => ReactNode;
245
- renderNoEvents?: () => ReactNode;
246
- }
247
-
248
- declare const Calendar$1: React.FC<CalendarComponentProps$1>;
249
-
250
- declare const DatePopup$1: React.FC<DatePopupProps$1>;
251
-
252
- type index$2_CalendarActions = CalendarActions;
253
- type index$2_CalendarConfig = CalendarConfig;
254
- type index$2_CalendarDate = CalendarDate;
255
- type index$2_CalendarEngine = CalendarEngine;
256
- declare const index$2_CalendarEngine: typeof CalendarEngine;
257
- type index$2_CalendarEvent = CalendarEvent;
258
- type index$2_CalendarEventHandler = CalendarEventHandler;
259
- type index$2_CalendarProps = CalendarProps;
260
- type index$2_CalendarState = CalendarState;
261
- type index$2_CalendarTheme = CalendarTheme;
262
- type index$2_CalendarViewModel = CalendarViewModel;
263
- type index$2_CategoryColorMap = CategoryColorMap;
264
- declare const index$2_DAYS: typeof DAYS;
265
- declare const index$2_DEFAULT_CATEGORY_COLORS: typeof DEFAULT_CATEGORY_COLORS;
266
- declare const index$2_MONTHS: typeof MONTHS;
267
- declare const index$2_MONTHS_FULL: typeof MONTHS_FULL;
268
- type index$2_PopupPosition = PopupPosition;
269
- type index$2_ReactCalendarProps = ReactCalendarProps;
270
- declare const index$2_formatAttendees: typeof formatAttendees;
271
- declare const index$2_formatDateForDisplay: typeof formatDateForDisplay;
272
- declare const index$2_formatTimeRange: typeof formatTimeRange;
273
- declare const index$2_generateCalendarDates: typeof generateCalendarDates;
274
- declare const index$2_generateYears: typeof generateYears;
275
- declare const index$2_getCategoryColor: typeof getCategoryColor;
276
- declare const index$2_getCellClasses: typeof getCellClasses;
277
- declare const index$2_getDefaultEventColor: typeof getDefaultEventColor;
278
- declare const index$2_getEventsForDate: typeof getEventsForDate;
279
- declare const index$2_getMonthYearText: typeof getMonthYearText;
280
- declare const index$2_getPopupPositionClass: typeof getPopupPositionClass;
281
- declare const index$2_hasEvents: typeof hasEvents;
282
- declare const index$2_isSameDay: typeof isSameDay;
283
- declare const index$2_isToday: typeof isToday;
284
- declare const index$2_isValidHexColor: typeof isValidHexColor;
285
- declare const index$2_mergeCategoryColors: typeof mergeCategoryColors;
286
- declare const index$2_normalizeDate: typeof normalizeDate;
287
- declare const index$2_sortEventsByTime: typeof sortEventsByTime;
288
- declare namespace index$2 {
289
- 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, index$2_MONTHS_FULL as MONTHS_FULL, 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 };
290
- }
291
-
292
- interface ReactNativeCalendarProps extends CalendarProps {
293
- style?: ViewStyle;
294
- containerStyle?: ViewStyle;
295
- headerStyle?: ViewStyle;
296
- headerTextStyle?: TextStyle;
297
- cellStyle?: ViewStyle;
298
- cellTextStyle?: TextStyle;
299
- renderEvent?: (event: CalendarEvent) => ReactNode;
300
- renderNoEvents?: () => ReactNode;
301
- title?: string;
302
- showCloseButton?: boolean;
303
- theme?: CalendarTheme;
304
- }
305
- type CalendarComponentProps = ReactNativeCalendarProps;
306
- interface DatePopupProps {
307
- visible: boolean;
308
- selectedDate: Date | null;
309
- events: CalendarEvent[];
310
- scheduleDay: string;
311
- onClose: () => void;
312
- onEventClick?: (event: CalendarEvent) => void;
313
- renderEvent?: (event: CalendarEvent) => ReactNode;
314
- renderNoEvents?: () => ReactNode;
315
- showCloseButton?: boolean;
316
- }
317
- interface SelectProps {
318
- options: Array<{
319
- label: string;
320
- value: number;
321
- }>;
322
- selectedValue: number;
323
- onValueChange: (value: number) => void;
324
- style?: ViewStyle;
325
- textStyle?: TextStyle;
326
- }
327
-
328
- declare const Calendar: React.FC<CalendarComponentProps>;
329
-
330
- declare const DatePopup: React.FC<DatePopupProps>;
331
-
332
- declare const calendarStyles: {
333
- container: {
334
- flex: number;
335
- backgroundColor: string;
336
- };
337
- titleContainer: {
338
- paddingVertical: number;
339
- alignItems: "center";
340
- };
341
- title: {
342
- fontSize: number;
343
- fontWeight: "600";
344
- color: string;
345
- };
346
- contentContainer: {
347
- marginHorizontal: number;
348
- marginTop: number;
349
- };
350
- card: {
351
- backgroundColor: string;
352
- borderRadius: number;
353
- shadowColor: string;
354
- shadowOffset: {
355
- width: number;
356
- height: number;
357
- };
358
- shadowOpacity: number;
359
- shadowRadius: number;
360
- elevation: number;
361
- overflow: "hidden";
362
- };
363
- cardHeader: {
364
- backgroundColor: string;
365
- paddingVertical: number;
366
- paddingHorizontal: number;
367
- borderBottomWidth: number;
368
- borderBottomColor: string;
369
- };
370
- cardHeaderText: {
371
- fontSize: number;
372
- fontWeight: "500";
373
- color: string;
374
- textAlign: "center";
375
- };
376
- table: {
377
- backgroundColor: string;
378
- };
379
- tableHeader: {
380
- flexDirection: "row";
381
- backgroundColor: string;
382
- borderBottomWidth: number;
383
- borderBottomColor: string;
384
- };
385
- tableHeaderCell: {
386
- flex: number;
387
- paddingVertical: number;
388
- borderRightWidth: number;
389
- borderRightColor: string;
390
- alignItems: "center";
391
- justifyContent: "center";
392
- };
393
- tableHeaderText: {
394
- fontSize: number;
395
- fontWeight: "600";
396
- color: string;
397
- };
398
- tableRow: {
399
- flexDirection: "row";
400
- borderBottomWidth: number;
401
- borderBottomColor: string;
402
- };
403
- tableCell: {
404
- flex: number;
405
- height: number;
406
- borderRightWidth: number;
407
- borderRightColor: string;
408
- alignItems: "center";
409
- justifyContent: "center";
410
- position: "relative";
411
- };
412
- tableCellText: {
413
- fontSize: number;
414
- color: string;
415
- };
416
- cellToday: {
417
- borderWidth: number;
418
- borderColor: string;
419
- };
420
- cellTodayText: {
421
- fontWeight: "bold";
422
- };
423
- cellWithEvents: {
424
- backgroundColor: string;
425
- };
426
- eventIndicator: {
427
- position: "absolute";
428
- bottom: number;
429
- width: number;
430
- height: number;
431
- backgroundColor: string;
432
- borderRadius: number;
433
- };
434
- navigationContainer: {
435
- flexDirection: "row";
436
- justifyContent: "space-between";
437
- paddingHorizontal: number;
438
- paddingVertical: number;
439
- gap: number;
440
- };
441
- navigationButton: {
442
- flex: number;
443
- backgroundColor: string;
444
- borderWidth: number;
445
- borderColor: string;
446
- borderRadius: number;
447
- paddingVertical: number;
448
- paddingHorizontal: number;
449
- alignItems: "center";
450
- justifyContent: "center";
451
- };
452
- navigationButtonText: {
453
- color: string;
454
- fontSize: number;
455
- fontWeight: "500";
456
- };
457
- navigationButtonPressed: {
458
- backgroundColor: string;
459
- };
460
- navigationButtonTextPressed: {
461
- color: string;
462
- };
463
- jumpForm: {
464
- flexDirection: "row";
465
- alignItems: "center";
466
- justifyContent: "center";
467
- paddingHorizontal: number;
468
- paddingBottom: number;
469
- gap: number;
470
- };
471
- jumpLabel: {
472
- fontSize: number;
473
- fontWeight: "300";
474
- color: string;
475
- };
476
- jumpSelect: {
477
- borderWidth: number;
478
- borderColor: string;
479
- borderRadius: number;
480
- paddingHorizontal: number;
481
- paddingVertical: number;
482
- backgroundColor: string;
483
- minWidth: number;
484
- };
485
- jumpSelectText: {
486
- fontSize: number;
487
- color: string;
488
- textAlign: "center";
489
- };
490
- popupOverlay: {
491
- position: "absolute";
492
- top: number;
493
- left: number;
494
- right: number;
495
- bottom: number;
496
- backgroundColor: string;
497
- justifyContent: "center";
498
- alignItems: "center";
499
- zIndex: number;
500
- };
501
- popup: {
502
- backgroundColor: string;
503
- borderRadius: number;
504
- width: number;
505
- maxWidth: number;
506
- maxHeight: number;
507
- shadowColor: string;
508
- shadowOffset: {
509
- width: number;
510
- height: number;
511
- };
512
- shadowOpacity: number;
513
- shadowRadius: number;
514
- elevation: number;
515
- overflow: "hidden";
516
- };
517
- popupHeader: {
518
- backgroundColor: string;
519
- paddingVertical: number;
520
- paddingHorizontal: number;
521
- flexDirection: "row";
522
- justifyContent: "space-between";
523
- alignItems: "center";
524
- };
525
- popupHeaderText: {
526
- fontSize: number;
527
- fontWeight: "600";
528
- color: string;
529
- flex: number;
530
- };
531
- popupCloseButton: {
532
- width: number;
533
- height: number;
534
- backgroundColor: string;
535
- borderRadius: number;
536
- alignItems: "center";
537
- justifyContent: "center";
538
- };
539
- popupCloseText: {
540
- color: string;
541
- fontSize: number;
542
- fontWeight: "bold";
543
- };
544
- scrollHint: {
545
- backgroundColor: string;
546
- paddingVertical: number;
547
- paddingHorizontal: number;
548
- alignItems: "center";
549
- };
550
- scrollHintText: {
551
- color: string;
552
- fontSize: number;
553
- fontWeight: "500";
554
- };
555
- eventsContainer: {
556
- maxHeight: number;
557
- };
558
- eventsList: {
559
- padding: number;
560
- gap: number;
561
- };
562
- eventCard: {
563
- backgroundColor: string;
564
- borderRadius: number;
565
- padding: number;
566
- borderLeftWidth: number;
567
- borderLeftColor: string;
568
- borderWidth: number;
569
- borderColor: string;
570
- shadowColor: string;
571
- shadowOffset: {
572
- width: number;
573
- height: number;
574
- };
575
- shadowOpacity: number;
576
- shadowRadius: number;
577
- elevation: number;
578
- };
579
- eventHeader: {
580
- marginBottom: number;
581
- };
582
- eventTitle: {
583
- fontSize: number;
584
- color: string;
585
- fontWeight: "600";
586
- marginBottom: number;
587
- };
588
- eventBadges: {
589
- flexDirection: "row";
590
- gap: number;
591
- flexWrap: "wrap";
592
- };
593
- badge: {
594
- paddingHorizontal: number;
595
- paddingVertical: number;
596
- borderRadius: number;
597
- };
598
- badgeText: {
599
- fontSize: number;
600
- fontWeight: "600";
601
- textTransform: "uppercase";
602
- letterSpacing: number;
603
- };
604
- priorityBadgeHigh: {
605
- backgroundColor: string;
606
- };
607
- priorityBadgeMedium: {
608
- backgroundColor: string;
609
- };
610
- priorityBadgeLow: {
611
- backgroundColor: string;
612
- };
613
- statusBadgeCompleted: {
614
- backgroundColor: string;
615
- };
616
- statusBadgeCancelled: {
617
- backgroundColor: string;
618
- };
619
- statusBadgeTentative: {
620
- backgroundColor: string;
621
- };
622
- categoryBadgeWork: {
623
- backgroundColor: string;
624
- };
625
- categoryBadgePersonal: {
626
- backgroundColor: string;
627
- };
628
- categoryBadgeMeeting: {
629
- backgroundColor: string;
630
- };
631
- categoryBadgeDeadline: {
632
- backgroundColor: string;
633
- };
634
- categoryBadgeAppointment: {
635
- backgroundColor: string;
636
- };
637
- categoryBadgeOther: {
638
- backgroundColor: string;
639
- };
640
- eventTime: {
641
- flexDirection: "row" | "column";
642
- gap: number;
643
- marginBottom: number;
644
- };
645
- eventTimeLabel: {
646
- fontSize: number;
647
- fontWeight: "600";
648
- color: string;
649
- minWidth: number | undefined;
650
- textAlign: "left";
651
- };
652
- eventTimeValue: {
653
- fontSize: number;
654
- color: string;
655
- flex: number;
656
- };
657
- eventDescription: {
658
- color: string;
659
- fontSize: number;
660
- lineHeight: number;
661
- marginTop: number;
662
- marginBottom: number;
663
- paddingVertical: number;
664
- paddingHorizontal: number;
665
- backgroundColor: string;
666
- borderLeftWidth: number;
667
- borderLeftColor: string;
668
- borderRadius: number;
669
- textAlign: "left";
670
- };
671
- eventUrlContainer: {
672
- marginTop: number;
673
- };
674
- eventLink: {
675
- color: string;
676
- fontSize: number;
677
- fontWeight: "500";
678
- };
679
- eventTags: {
680
- flexDirection: "row";
681
- flexWrap: "wrap";
682
- gap: number;
683
- marginTop: number;
684
- };
685
- eventTag: {
686
- paddingHorizontal: number;
687
- paddingVertical: number;
688
- backgroundColor: string;
689
- borderRadius: number;
690
- };
691
- eventTagText: {
692
- fontSize: number;
693
- color: string;
694
- fontWeight: "500";
695
- };
696
- noEventsMessage: {
697
- padding: number;
698
- paddingVertical: number;
699
- alignItems: "center";
700
- };
701
- noEventsText: {
702
- fontSize: number;
703
- color: string;
704
- textAlign: "center";
705
- };
706
- };
707
-
708
- declare const index$1_Calendar: typeof Calendar;
709
- type index$1_CalendarActions = CalendarActions;
710
- type index$1_CalendarComponentProps = CalendarComponentProps;
711
- type index$1_CalendarConfig = CalendarConfig;
712
- type index$1_CalendarDate = CalendarDate;
713
- type index$1_CalendarEngine = CalendarEngine;
714
- declare const index$1_CalendarEngine: typeof CalendarEngine;
715
- type index$1_CalendarEvent = CalendarEvent;
716
- type index$1_CalendarEventHandler = CalendarEventHandler;
717
- type index$1_CalendarProps = CalendarProps;
718
- type index$1_CalendarState = CalendarState;
719
- type index$1_CalendarTheme = CalendarTheme;
720
- type index$1_CalendarViewModel = CalendarViewModel;
721
- type index$1_CategoryColorMap = CategoryColorMap;
722
- declare const index$1_DAYS: typeof DAYS;
723
- declare const index$1_DEFAULT_CATEGORY_COLORS: typeof DEFAULT_CATEGORY_COLORS;
724
- declare const index$1_DatePopup: typeof DatePopup;
725
- type index$1_DatePopupProps = DatePopupProps;
726
- declare const index$1_MONTHS: typeof MONTHS;
727
- declare const index$1_MONTHS_FULL: typeof MONTHS_FULL;
728
- type index$1_PopupPosition = PopupPosition;
729
- type index$1_ReactNativeCalendarProps = ReactNativeCalendarProps;
730
- type index$1_SelectProps = SelectProps;
731
- declare const index$1_calendarStyles: typeof calendarStyles;
732
- declare const index$1_formatAttendees: typeof formatAttendees;
733
- declare const index$1_formatDateForDisplay: typeof formatDateForDisplay;
734
- declare const index$1_formatTimeRange: typeof formatTimeRange;
735
- declare const index$1_generateCalendarDates: typeof generateCalendarDates;
736
- declare const index$1_generateYears: typeof generateYears;
737
- declare const index$1_getCategoryColor: typeof getCategoryColor;
738
- declare const index$1_getCellClasses: typeof getCellClasses;
739
- declare const index$1_getDefaultEventColor: typeof getDefaultEventColor;
740
- declare const index$1_getEventsForDate: typeof getEventsForDate;
741
- declare const index$1_getMonthYearText: typeof getMonthYearText;
742
- declare const index$1_getPopupPositionClass: typeof getPopupPositionClass;
743
- declare const index$1_hasEvents: typeof hasEvents;
744
- declare const index$1_isSameDay: typeof isSameDay;
745
- declare const index$1_isToday: typeof isToday;
746
- declare const index$1_isValidHexColor: typeof isValidHexColor;
747
- declare const index$1_mergeCategoryColors: typeof mergeCategoryColors;
748
- declare const index$1_normalizeDate: typeof normalizeDate;
749
- declare const index$1_sortEventsByTime: typeof sortEventsByTime;
750
- declare namespace index$1 {
751
- 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, index$1_MONTHS_FULL as MONTHS_FULL, 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 };
752
- }
753
-
754
- interface VanillaCalendarProps extends CalendarProps {
755
- container: HTMLElement | string;
756
- className?: string;
757
- title?: string;
758
- renderEvent?: (event: CalendarEvent) => string;
759
- renderNoEvents?: () => string;
760
- theme?: CalendarTheme;
761
- }
762
- interface VanillaCalendarInstance {
763
- destroy: () => void;
764
- updateEvents: (events: CalendarEvent[]) => void;
765
- updateTheme: (theme: CalendarTheme) => void;
766
- getCurrentDate: () => Date | null;
767
- goToDate: (date: Date) => void;
768
- getEngine: () => CalendarEngine;
769
- }
770
-
771
- declare class VanillaCalendar implements VanillaCalendarInstance {
223
+ declare class CalendarElement extends HTMLElement {
224
+ static observedAttributes: string[];
772
225
  private engine;
773
- private container;
774
226
  private unsubscribe;
775
- private props;
776
227
  private actions;
777
228
  private pickerOpen;
778
229
  private yearInput;
779
230
  private yearInputValid;
231
+ private listenersAttached;
780
232
  private clickOutsideHandler;
781
233
  private delegatedClickHandler;
782
234
  private delegatedInputHandler;
783
235
  private delegatedBlurHandler;
784
236
  private delegatedKeydownHandler;
785
- private listenersAttached;
786
- constructor(props: VanillaCalendarProps);
237
+ private _events;
238
+ private _theme;
239
+ private _categoryColors;
240
+ private _renderEvent;
241
+ private _renderNoEvents;
242
+ get events(): CalendarEvent[];
243
+ set events(val: CalendarEvent[]);
244
+ set theme(val: CalendarTheme);
245
+ set categoryColors(val: CategoryColorMap);
246
+ set renderEvent(val: (e: CalendarEvent) => string);
247
+ set renderNoEvents(val: () => string);
248
+ connectedCallback(): void;
249
+ disconnectedCallback(): void;
250
+ attributeChangedCallback(_name: string, oldVal: string | null, newVal: string | null): void;
251
+ private get minYear();
252
+ private get maxYear();
253
+ private initEngine;
254
+ private reinit;
255
+ private cleanup;
787
256
  private applyTheme;
788
- private init;
789
257
  private render;
790
258
  private attachEventListeners;
791
259
  private updatePickerYear;
@@ -795,55 +263,33 @@ declare class VanillaCalendar implements VanillaCalendarInstance {
795
263
  getCurrentDate(): Date | null;
796
264
  goToDate(date: Date): void;
797
265
  getEngine(): CalendarEngine;
798
- destroy(): void;
799
266
  }
800
- declare function createCalendar(props: VanillaCalendarProps): VanillaCalendarInstance;
267
+ declare function defineCalendarElement(tagName?: string): void;
801
268
 
802
- type index_CalendarActions = CalendarActions;
803
- type index_CalendarConfig = CalendarConfig;
804
- type index_CalendarDate = CalendarDate;
805
- type index_CalendarEngine = CalendarEngine;
806
- declare const index_CalendarEngine: typeof CalendarEngine;
807
- type index_CalendarEvent = CalendarEvent;
808
- type index_CalendarEventHandler = CalendarEventHandler;
809
- type index_CalendarProps = CalendarProps;
810
- type index_CalendarState = CalendarState;
811
- type index_CalendarTheme = CalendarTheme;
812
- type index_CalendarViewModel = CalendarViewModel;
813
- type index_CategoryColorMap = CategoryColorMap;
814
- declare const index_DAYS: typeof DAYS;
815
- declare const index_DEFAULT_CATEGORY_COLORS: typeof DEFAULT_CATEGORY_COLORS;
816
- declare const index_MONTHS: typeof MONTHS;
817
- declare const index_MONTHS_FULL: typeof MONTHS_FULL;
818
- type index_PopupPosition = PopupPosition;
819
- type index_VanillaCalendar = VanillaCalendar;
820
- declare const index_VanillaCalendar: typeof VanillaCalendar;
821
- type index_VanillaCalendarInstance = VanillaCalendarInstance;
822
- type index_VanillaCalendarProps = VanillaCalendarProps;
823
- declare const index_createCalendar: typeof createCalendar;
824
- declare const index_formatAttendees: typeof formatAttendees;
825
- declare const index_formatDateForDisplay: typeof formatDateForDisplay;
826
- declare const index_formatTimeRange: typeof formatTimeRange;
827
- declare const index_generateCalendarDates: typeof generateCalendarDates;
828
- declare const index_generateYears: typeof generateYears;
829
- declare const index_getCategoryColor: typeof getCategoryColor;
830
- declare const index_getCellClasses: typeof getCellClasses;
831
- declare const index_getDefaultEventColor: typeof getDefaultEventColor;
832
- declare const index_getEventsForDate: typeof getEventsForDate;
833
- declare const index_getMonthYearText: typeof getMonthYearText;
834
- declare const index_getPopupPositionClass: typeof getPopupPositionClass;
835
- declare const index_hasEvents: typeof hasEvents;
836
- declare const index_isSameDay: typeof isSameDay;
837
- declare const index_isToday: typeof isToday;
838
- declare const index_isValidHexColor: typeof isValidHexColor;
839
- declare const index_mergeCategoryColors: typeof mergeCategoryColors;
840
- declare const index_normalizeDate: typeof normalizeDate;
841
- declare const index_sortEventsByTime: typeof sortEventsByTime;
842
- declare namespace index {
843
- 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, index_MONTHS_FULL as MONTHS_FULL, 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 };
269
+ interface CalendarElementProps {
270
+ events?: CalendarEvent[];
271
+ initialDate?: Date;
272
+ minYear?: number;
273
+ maxYear?: number;
274
+ weekStartsOn?: 0 | 1;
275
+ useShortMonthNames?: boolean;
276
+ title?: string;
277
+ theme?: CalendarTheme;
278
+ categoryColors?: CategoryColorMap;
279
+ renderEvent?: (event: CalendarEvent) => string;
280
+ renderNoEvents?: () => string;
281
+ }
282
+ interface CalendarElementInstance {
283
+ events: CalendarEvent[];
284
+ theme: CalendarTheme;
285
+ categoryColors: CategoryColorMap;
286
+ renderEvent: (event: CalendarEvent) => string;
287
+ renderNoEvents: () => string;
288
+ updateEvents: (events: CalendarEvent[]) => void;
289
+ updateTheme: (theme: CalendarTheme) => void;
290
+ getCurrentDate: () => Date | null;
291
+ goToDate: (date: Date) => void;
292
+ getEngine: () => CalendarEngine;
844
293
  }
845
294
 
846
- declare const version = "1.0.0";
847
- declare const name = "kalendly";
848
-
849
- 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, MONTHS_FULL, 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 };
295
+ export { type CalendarActions, type CalendarConfig, type CalendarDate, CalendarElement, type CalendarElementInstance, type CalendarElementProps, CalendarEngine, type CalendarEvent, type CalendarEventHandler, type CalendarProps, type CalendarState, type CalendarTheme, type CalendarViewModel, type CategoryColorMap, DAYS, DEFAULT_CATEGORY_COLORS, MONTHS, MONTHS_FULL, type PopupPosition, defineCalendarElement, formatAttendees, formatDateForDisplay, formatTimeRange, generateCalendarDates, generateYears, getCategoryColor, getCellClasses, getDefaultEventColor, getEventsForDate, getMonthYearText, getPopupPositionClass, hasEvents, isSameDay, isToday, isValidHexColor, mergeCategoryColors, normalizeDate, sortEventsByTime };