big-calendar 0.2.0 → 0.2.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.
Files changed (2) hide show
  1. package/README.md +40 -155
  2. package/package.json +10 -7
package/README.md CHANGED
@@ -1,185 +1,70 @@
1
- # Big Calendar
1
+ # big-calendar
2
2
 
3
- A highly customizable React calendar component library with multiple views, drag-and-drop, API integration, and extensive customization options.
3
+ React + Tailwind implementation of [Big Calendar](https://github.com/lramos33/big-calendar), with extended host-app control over views, events, and behavior via props and API.
4
4
 
5
- > **Note**: This package is originally from [lramos33/big-calendar](https://github.com/lramos33/big-calendar) on GitHub.
5
+ ---
6
6
 
7
- ## Features
7
+ ## Thank you & credit
8
8
 
9
- - 📅 **Multiple Views**: Day, Week, Month, Year, and Agenda views
10
- - 🎨 **Highly Customizable**: Full control over styling, API integration, and behavior
11
- - 🔄 **Drag & Drop**: Reschedule events by dragging
12
- - 🎯 **API Integration**: Connect to your backend or third-party calendars
13
- - 🎨 **Styling Control**: CSS variables, className props, and theme customization
14
- - 👤 **Single-User Mode**: Simplified UI for single-user applications
15
- - 📱 **Responsive**: Works on all screen sizes
16
- - 🌙 **Dark Mode**: Built-in dark mode support
9
+ **A big thank you to the original author** [**lramos33**](https://github.com/lramos33) for the [Big Calendar](https://github.com/lramos33/big-calendar) project this package is based on. This fork adds React + Tailwind, host-controlled behavior, and API integration while building on that work.
17
10
 
18
- ## Installation
11
+ ---
12
+
13
+ ## Install
19
14
 
20
15
  ```bash
21
16
  npm install big-calendar
22
17
  ```
23
18
 
24
- ## Quick Start
25
-
26
- ```jsx
27
- import { CalendarProvider, ClientContainer } from 'big-calendar';
28
- import 'big-calendar/styles'; // Import styles
29
-
30
- function App() {
31
- return (
32
- <CalendarProvider useMocks={true}>
33
- <ClientContainer view="month" />
34
- </CalendarProvider>
35
- );
36
- }
37
- ```
38
-
39
- ## Basic Usage
19
+ **Requirements:** React 18+, Tailwind CSS in your app.
40
20
 
41
- ### With Mock Data
21
+ Add the package to Tailwind content in `tailwind.config.js`:
42
22
 
43
- ```jsx
44
- import { CalendarProvider, ClientContainer } from 'big-calendar';
45
- import 'big-calendar/styles';
46
-
47
- function MyCalendar() {
48
- return (
49
- <CalendarProvider useMocks={true}>
50
- <ClientContainer view="month" />
51
- </CalendarProvider>
52
- );
53
- }
23
+ ```js
24
+ content: [
25
+ "./src/**/*.{js,jsx,ts,tsx}",
26
+ "./node_modules/big-calendar/dist/**/*.{js,jsx}",
27
+ ],
54
28
  ```
55
29
 
56
- ### With API Integration
30
+ ## Usage
57
31
 
58
32
  ```jsx
59
- import { CalendarProvider, ClientContainer } from 'big-calendar';
33
+ import { CalendarProvider, CalendarRoot, ClientContainer } from 'big-calendar';
60
34
  import 'big-calendar/styles';
61
35
 
62
- const calendarAPI = {
63
- getEvents: async () => {
64
- const response = await fetch('/api/events');
65
- return response.json();
66
- },
67
- getUsers: async () => {
68
- const response = await fetch('/api/users');
69
- return response.json();
70
- },
71
- createEvent: async (eventData) => {
72
- const response = await fetch('/api/events', {
73
- method: 'POST',
74
- headers: { 'Content-Type': 'application/json' },
75
- body: JSON.stringify(eventData),
76
- });
77
- return response.json();
78
- },
79
- updateEvent: async (eventData) => {
80
- const response = await fetch(`/api/events/${eventData.id}`, {
81
- method: 'PUT',
82
- headers: { 'Content-Type': 'application/json' },
83
- body: JSON.stringify(eventData),
84
- });
85
- return response.json();
86
- },
87
- deleteEvent: async (eventId) => {
88
- await fetch(`/api/events/${eventId}`, { method: 'DELETE' });
89
- },
90
- };
91
-
92
- function MyCalendar() {
93
- return (
94
- <CalendarProvider api={calendarAPI}>
95
- <ClientContainer view="month" />
96
- </CalendarProvider>
97
- );
98
- }
99
- ```
100
-
101
- ## Customization
102
-
103
- ### Side Panel for Event Details
104
-
105
- ```jsx
106
- <CalendarProvider
107
- eventClickHandler={{
108
- mode: "sidePanel",
109
- sidePanelPosition: "right",
110
- sidePanelWidth: 400,
111
- }}
112
- >
113
- <ClientContainer view="month" />
36
+ // With mock data
37
+ <CalendarProvider useMocks={true}>
38
+ <CalendarRoot>
39
+ <ClientContainer view="month" />
40
+ </CalendarRoot>
114
41
  </CalendarProvider>
115
- ```
116
42
 
117
- ### Single-User Mode
118
-
119
- ```jsx
120
- <CalendarProvider
121
- singleUser={true}
122
- currentUser={{
123
- id: "user-123",
124
- name: "John Doe",
125
- picturePath: "/avatar.jpg",
126
- }}
127
- >
128
- <ClientContainer view="month" />
43
+ // With your API
44
+ const api = {
45
+ getEvents: async () => (await fetch('/api/events')).json(),
46
+ getUsers: async () => (await fetch('/api/users')).json(),
47
+ createEvent: async (data) => /* ... */,
48
+ updateEvent: async (data) => /* ... */,
49
+ deleteEvent: async (id) => /* ... */,
50
+ };
51
+ <CalendarProvider api={api}>
52
+ <CalendarRoot>
53
+ <ClientContainer view="month" />
54
+ </CalendarRoot>
129
55
  </CalendarProvider>
130
56
  ```
131
57
 
132
- ### Custom Styling
133
-
134
- ```css
135
- /* Override CSS variables */
136
- :root {
137
- --calendar-container-border-radius: 1rem;
138
- --calendar-event-border-radius: 0.5rem;
139
- --calendar-event-blue-bg: 217 91% 95%;
140
- }
141
- ```
142
-
143
- ```jsx
144
- <ClientContainer
145
- view="month"
146
- className="bigcal-my-custom-calendar"
147
- headerclassName="bigcal-custom-header"
148
- />
149
- ```
150
-
151
- ## Documentation
58
+ **Views:** `view="month" | "week" | "day" | "agenda" | "year"`
152
59
 
153
- For complete documentation and customization options, see [CUSTOMIZATION.md](./CUSTOMIZATION.md).
154
-
155
- ## Requirements
156
-
157
- - React 18+
158
- - Tailwind CSS (for styling)
159
-
160
- ## Tailwind CSS Setup
60
+ ## Customization
161
61
 
162
- You'll need to configure Tailwind CSS in your project. Add to your `tailwind.config.js`:
62
+ - **Single-user:** `singleUser={true}` and `currentUser={{ id, name, picturePath }}`
63
+ - **Event click:** `eventClickHandler={{ mode: "sidePanel", sidePanelPosition: "right", sidePanelWidth: 400 }}`
64
+ - **Styling:** CSS variables (e.g. `--calendar-container-border-radius`) or `className` / `headerClassName` on `ClientContainer`
163
65
 
164
- ```js
165
- module.exports = {
166
- content: [
167
- "./src/**/*.{js,jsx,ts,tsx}",
168
- "./node_modules/big-calendar/dist/**/*.{js,jsx}", // Include big-calendar
169
- ],
170
- theme: {
171
- extend: {
172
- // Your theme extensions
173
- },
174
- },
175
- plugins: [],
176
- }
177
- ```
66
+ Full options: [CUSTOMIZATION.md](./CUSTOMIZATION.md).
178
67
 
179
68
  ## License
180
69
 
181
70
  MIT
182
-
183
- ## Contributing
184
-
185
- Contributions are welcome! Please feel free to submit a Pull Request.
package/package.json CHANGED
@@ -1,26 +1,29 @@
1
1
  {
2
2
  "name": "big-calendar",
3
- "version": "0.2.0",
4
- "description": "A highly customizable React calendar component library with multiple views, drag-and-drop, and full API integration support. Originally from https://github.com/lramos33/big-calendar",
3
+ "version": "0.2.1",
4
+ "description": "React + Tailwind implementation of Big Calendar. Fork extending the original with host-app control: control views, events, and behavior via props and API from your app.",
5
5
  "keywords": [
6
6
  "react",
7
+ "tailwind",
7
8
  "calendar",
8
9
  "calendar-component",
9
10
  "react-calendar",
10
11
  "event-calendar",
11
12
  "scheduler",
12
13
  "date-picker",
13
- "calendar-view"
14
+ "calendar-view",
15
+ "big-calendar",
16
+ "fork"
14
17
  ],
15
- "author": "",
18
+ "author": "Noam Suissa (https://github.com/noamsuissa)",
16
19
  "license": "MIT",
17
20
  "repository": {
18
21
  "type": "git",
19
- "url": "https://github.com/lramos33/big-calendar.git"
22
+ "url": "https://github.com/noamsuissa/big-calendar.git"
20
23
  },
21
- "homepage": "https://github.com/lramos33/big-calendar",
24
+ "homepage": "https://github.com/noamsuissa/big-calendar#readme",
22
25
  "bugs": {
23
- "url": "https://github.com/lramos33/big-calendar/issues"
26
+ "url": "https://github.com/noamsuissa/big-calendar/issues"
24
27
  },
25
28
  "main": "./dist/big-calendar.cjs",
26
29
  "module": "./dist/big-calendar.mjs",