@ilamy/calendar 1.8.1 → 2.0.1
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 +59 -12
- package/dist/index.d.ts +400 -132
- package/dist/index.js +3 -7
- package/dist/plugins/agenda.d.ts +349 -0
- package/dist/plugins/agenda.js +1 -0
- package/dist/plugins/drag-to-create.d.ts +364 -0
- package/dist/plugins/drag-to-create.js +1 -0
- package/dist/plugins/recurrence.d.ts +383 -0
- package/dist/plugins/recurrence.js +2 -0
- package/dist/shared/chunk-328e2ygt.js +2 -0
- package/dist/shared/chunk-a9j9sahk.js +2 -0
- package/dist/shared/chunk-jfadfww5.js +2 -0
- package/dist/testing/index.d.ts +579 -0
- package/dist/testing/index.js +1 -0
- package/package.json +28 -43
- package/LICENSE +0 -21
package/README.md
CHANGED
|
@@ -4,10 +4,10 @@
|
|
|
4
4
|
[](https://github.com/kcsujeet/ilamy-calendar/blob/main/LICENSE)
|
|
5
5
|
[](https://github.com/kcsujeet/ilamy-calendar/actions)
|
|
6
6
|
|
|
7
|
-
A powerful, full-featured React calendar component library built with **TypeScript**, **Tailwind CSS 4**, and **
|
|
7
|
+
A powerful, full-featured yet **lightweight and highly pluggable** React calendar component library built with **TypeScript**, **Tailwind CSS 4**, and **shadcn/ui**. The core is small — ~40 KB minified (≈13 KB gzipped) — with opt-in plugins for recurring events, agenda views, and more, so you only ship what you use. Built for high-performance scheduling with RFC 5545 recurring events, resource management, and drag-and-drop interactions.
|
|
8
8
|
|
|
9
9
|
<div align="center">
|
|
10
|
-
<img width="
|
|
10
|
+
<img width="1159" height="698" alt="Screenshot 2026-07-12 at 2 44 36 PM" src="https://github.com/user-attachments/assets/316c6ad4-2965-4dc4-b779-88b0ac916669" />
|
|
11
11
|
<p align="center"><i>Elegant month view with seamless event transitions</i></p>
|
|
12
12
|
</div>
|
|
13
13
|
|
|
@@ -26,14 +26,22 @@ A powerful, full-featured React calendar component library built with **TypeScri
|
|
|
26
26
|
- **Resource-Aware Validation**: Ensure events are correctly assigned and don't overlap where prohibited.
|
|
27
27
|
|
|
28
28
|
### Recurring Events (RFC 5545)
|
|
29
|
+
|
|
30
|
+
Opt-in via the recurrence plugin (`plugins={[recurrencePlugin()]}` from `@ilamy/calendar/plugins/recurrence`).
|
|
31
|
+
|
|
29
32
|
- **Full RRULE Support**: Daily, Weekly, Monthly, Yearly patterns with complex frequencies.
|
|
30
33
|
- **Smart CRUD**: Google Calendar-style operations—edit "this event", "this and following", or "all events".
|
|
31
34
|
- **Exclusion Dates**: Robust handling of EXDATE and modified instances within a series.
|
|
32
35
|
- **iCalendar Export**: Export events to `.ics` files with strict RFC 5545 compliance.
|
|
33
36
|
|
|
34
|
-
###
|
|
37
|
+
### Plugin System
|
|
38
|
+
- **Opt-in capabilities**: The core ships no plugins. Add behavior through the `plugins` prop, each from its own subpath: `@ilamy/calendar/plugins/recurrence` (RFC 5545 recurring events) and `@ilamy/calendar/plugins/agenda` (agenda list view).
|
|
39
|
+
|
|
40
|
+
### Internationalization & Timezones
|
|
35
41
|
- **Timezones**: Full timezone support via `dayjs.tz` with automatic DST handling.
|
|
36
42
|
- **Internationalization**: Support for 100+ locales with configurable week start days.
|
|
43
|
+
|
|
44
|
+
### Interactions
|
|
37
45
|
- **Drag & Drop**: Move and resize events with precision using `@dnd-kit`.
|
|
38
46
|
- **Responsive**: Adaptive layouts designed for desktop, tablet, and mobile.
|
|
39
47
|
|
|
@@ -51,16 +59,16 @@ Install the library and its peer dependencies using your preferred package manag
|
|
|
51
59
|
|
|
52
60
|
```bash
|
|
53
61
|
# npm
|
|
54
|
-
npm install @ilamy/calendar
|
|
62
|
+
npm install @ilamy/calendar dayjs
|
|
55
63
|
|
|
56
64
|
# bun
|
|
57
|
-
bun add @ilamy/calendar
|
|
65
|
+
bun add @ilamy/calendar dayjs
|
|
58
66
|
|
|
59
67
|
# pnpm
|
|
60
|
-
pnpm add @ilamy/calendar
|
|
68
|
+
pnpm add @ilamy/calendar dayjs
|
|
61
69
|
```
|
|
62
70
|
|
|
63
|
-
> **Note**: This library requires **React 19+** and **Tailwind CSS 4+**.
|
|
71
|
+
> **Note**: This library requires **React 19+** and **Tailwind CSS 4+**. Peers: `dayjs`, `react`, `react-dom`, `tailwindcss` (v4), `tailwindcss-animate`. `dayjs` is in the command above because the calendar's API uses `dayjs` objects and shares your app's instance/locale.
|
|
64
72
|
|
|
65
73
|
---
|
|
66
74
|
|
|
@@ -68,7 +76,6 @@ pnpm add @ilamy/calendar
|
|
|
68
76
|
|
|
69
77
|
```tsx
|
|
70
78
|
import { IlamyCalendar } from '@ilamy/calendar';
|
|
71
|
-
import '@ilamy/calendar/dist/index.css'; // Import base styles
|
|
72
79
|
|
|
73
80
|
const MyApp = () => {
|
|
74
81
|
const events = [
|
|
@@ -95,13 +102,45 @@ const MyApp = () => {
|
|
|
95
102
|
|
|
96
103
|
---
|
|
97
104
|
|
|
105
|
+
## Styling — bring your own design system
|
|
106
|
+
|
|
107
|
+
`@ilamy/calendar` ships **no CSS**. Components use the conventional [shadcn/ui](https://ui.shadcn.com) token classes (`bg-background`, `text-muted-foreground`, `bg-primary`, `border-border`, …), so your design system supplies the look. Point Tailwind at the package so it generates the utilities (Tailwind v4 ignores `node_modules` by default — adjust the relative depth to your stylesheet):
|
|
108
|
+
|
|
109
|
+
```css
|
|
110
|
+
@source "../node_modules/@ilamy/calendar/dist";
|
|
111
|
+
```
|
|
112
|
+
|
|
113
|
+
If you already use shadcn, the tokens are defined and you're done. Otherwise, define the standard shadcn theme tokens (`--background`, `--primary`, `--border`, `--ring`, `--card`, …) so the calendar inherits your palette.
|
|
114
|
+
|
|
115
|
+
---
|
|
116
|
+
|
|
117
|
+
## Plugins
|
|
118
|
+
|
|
119
|
+
The core ships **no plugins**. Add capabilities through the `plugins` prop, each imported from its own subpath:
|
|
120
|
+
|
|
121
|
+
```tsx
|
|
122
|
+
import { IlamyCalendar } from '@ilamy/calendar';
|
|
123
|
+
import { recurrencePlugin } from '@ilamy/calendar/plugins/recurrence';
|
|
124
|
+
import { agendaPlugin } from '@ilamy/calendar/plugins/agenda';
|
|
125
|
+
|
|
126
|
+
<IlamyCalendar
|
|
127
|
+
events={events}
|
|
128
|
+
plugins={[recurrencePlugin(), agendaPlugin({ window: 'week' })]}
|
|
129
|
+
/>
|
|
130
|
+
```
|
|
131
|
+
|
|
132
|
+
- **`@ilamy/calendar/plugins/recurrence`** — RFC 5545 recurring-event expansion and scoped edit/delete. Also re-adds `rrule`/`recurrenceId`/`exdates` to `CalendarEvent`.
|
|
133
|
+
- **`@ilamy/calendar/plugins/agenda`** — an agenda (upcoming-events list) view scoped to a `window`.
|
|
134
|
+
|
|
135
|
+
---
|
|
136
|
+
|
|
98
137
|
## Examples
|
|
99
138
|
|
|
100
|
-
Explore the [examples directory](
|
|
139
|
+
Explore the [examples directory](https://github.com/kcsujeet/ilamy-calendar/tree/main/examples) for complete implementation patterns:
|
|
101
140
|
|
|
102
|
-
- [Next.js](
|
|
103
|
-
- [Astro](
|
|
104
|
-
- [Vite](
|
|
141
|
+
- [Next.js](https://github.com/kcsujeet/ilamy-calendar/tree/main/examples/nextjs) - Integration with Next.js and Tailwind CSS.
|
|
142
|
+
- [Astro](https://github.com/kcsujeet/ilamy-calendar/tree/main/examples/astro) - Static site integration with Astro.
|
|
143
|
+
- [Vite](https://github.com/kcsujeet/ilamy-calendar/tree/main/examples/vite) - Fast, minimal setup using Vite.
|
|
105
144
|
|
|
106
145
|
---
|
|
107
146
|
|
|
@@ -111,6 +150,14 @@ For comprehensive guides, API references, and interactive demos, visit [ilamy.de
|
|
|
111
150
|
|
|
112
151
|
---
|
|
113
152
|
|
|
153
|
+
## Support
|
|
154
|
+
|
|
155
|
+
ilamy Calendar is free and open source. If you'd like to support its development:
|
|
156
|
+
|
|
157
|
+
<a href="https://ko-fi.com/kcsujeet" target="_blank"><img src="https://ko-fi.com/img/githubbutton_sm.svg" alt="Buy me a coffee at ko-fi.com" style="height: 50px;" /></a>
|
|
158
|
+
|
|
159
|
+
---
|
|
160
|
+
|
|
114
161
|
## License
|
|
115
162
|
|
|
116
163
|
MIT © [Sujeet Kc](https://github.com/kcsujeet)
|