react-attendance-calendar 2.0.0 → 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 CHANGED
@@ -20,6 +20,10 @@ A highly customizable and developer-friendly React attendance calendar component
20
20
  npm install react-attendance-calendar
21
21
  ```
22
22
 
23
+ ### CSS Setup
24
+
25
+ The component uses Tailwind CSS v4. Make sure you have Tailwind CSS configured in your project. No additional CSS imports are needed.
26
+
23
27
  ## Usage
24
28
 
25
29
  ### Basic Usage
@@ -0,0 +1,30 @@
1
+ import { type ClassValue } from "clsx";
2
+ export declare function cn(...inputs: ClassValue[]): string;
3
+ export type MonthView = {
4
+ year: number;
5
+ monthIndex: number;
6
+ };
7
+ export type AttendanceData = {
8
+ year: number;
9
+ monthIndex: number;
10
+ presentDays: Set<number>;
11
+ absentDays: Set<number>;
12
+ };
13
+ export type CalendarProps = {
14
+ view: MonthView;
15
+ onChangeView: (next: MonthView) => void;
16
+ attendanceData?: AttendanceData;
17
+ onDateClick?: (day: number, month: number, year: number) => void;
18
+ showNavigation?: boolean;
19
+ showWeekdayHeaders?: boolean;
20
+ className?: string;
21
+ cellClassName?: string;
22
+ presentCellClassName?: string;
23
+ absentCellClassName?: string;
24
+ navigationButtonClassName?: string;
25
+ weekdayHeaderClassName?: string;
26
+ monthTitleClassName?: string;
27
+ containerClassName?: string;
28
+ };
29
+ export default function AttendanceCalendar({ view, onChangeView, attendanceData, onDateClick, showNavigation, showWeekdayHeaders, className, cellClassName, presentCellClassName, absentCellClassName, navigationButtonClassName, weekdayHeaderClassName, monthTitleClassName, containerClassName, }: CalendarProps): import("react/jsx-runtime").JSX.Element;
30
+ //# sourceMappingURL=AttendanceCalendar.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"AttendanceCalendar.d.ts","sourceRoot":"","sources":["../src/AttendanceCalendar.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAQ,KAAK,UAAU,EAAE,MAAM,MAAM,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,sBAA2B,EAC3B,mBAAwB,EACxB,kBAAuB,GACxB,EAAE,aAAa,2CAkNf"}
@@ -0,0 +1,3 @@
1
+ export { default as AttendanceCalendar, cn } from "./AttendanceCalendar";
2
+ export type { MonthView, AttendanceData, CalendarProps, } from "./AttendanceCalendar";
3
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,IAAI,kBAAkB,EAAE,EAAE,EAAE,MAAM,sBAAsB,CAAC;AACzE,YAAY,EACV,SAAS,EACT,cAAc,EACd,aAAa,GACd,MAAM,sBAAsB,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "react-attendance-calendar",
3
- "version": "2.0.0",
3
+ "version": "2.0.1",
4
4
  "description": "A responsive React attendance calendar component with TypeScript support",
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",
@@ -24,7 +24,7 @@
24
24
  "component",
25
25
  "ui"
26
26
  ],
27
- "author": "Your Name",
27
+ "author": "Alamin",
28
28
  "license": "MIT",
29
29
  "repository": {
30
30
  "type": "git",
@@ -37,7 +37,7 @@
37
37
  },
38
38
  "scripts": {
39
39
  "dev": "vite",
40
- "build": "tsc --project tsconfig.lib.json && vite build --mode library",
40
+ "build": "vite build --mode library && tsc --project tsconfig.lib.json",
41
41
  "build:types": "tsc --emitDeclarationOnly",
42
42
  "lint": "eslint .",
43
43
  "preview": "vite preview",