calendar-simple 1.2.0 → 2.0.0-beta.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/LICENSE +1 -1
- package/README.md +371 -62
- package/dist/calendar-simple.css +1 -1
- package/dist/index.cjs.js +1 -1
- package/dist/index.cjs.js.map +1 -1
- package/dist/index.es.js +7588 -978
- package/dist/index.es.js.map +1 -1
- package/dist/index.iife.js +1 -1
- package/dist/index.iife.js.map +1 -1
- package/dist/src/Calendar.d.ts +19 -0
- package/dist/src/Calendar.test.d.ts +1 -0
- package/dist/src/assets/LeftArrow.d.ts +3 -0
- package/dist/src/assets/RightArrow.d.ts +3 -0
- package/dist/src/components/core/all_day_banner/AllDayBanner.d.ts +9 -0
- package/dist/src/components/core/all_day_banner/AllDayBanner.test.d.ts +1 -0
- package/dist/src/components/core/current_time_line/CurrentTimeLine.d.ts +7 -0
- package/dist/src/components/core/current_time_line/CurrentTimeLine.test.d.ts +1 -0
- package/dist/src/components/core/day_column/DayColumn.d.ts +11 -0
- package/dist/src/components/core/day_column/DayColumn.test.d.ts +1 -0
- package/dist/src/components/core/day_event_item/DayWeekEventItem.d.ts +8 -0
- package/dist/src/components/core/day_event_item/DayWeekEventItem.test.d.ts +1 -0
- package/dist/src/components/core/month_event_item/MonthEventItem.d.ts +21 -0
- package/dist/src/components/core/month_event_item/MonthEventItem.test.d.ts +1 -0
- package/dist/src/components/core/time_column/TimeColumn.d.ts +6 -0
- package/dist/src/components/core/time_column/TimeColumn.test.d.ts +1 -0
- package/dist/src/components/layout/Header.d.ts +7 -0
- package/dist/src/components/layout/Header.test.d.ts +1 -0
- package/dist/src/components/ui/CalendarErrorBoundary.d.ts +14 -0
- package/dist/src/components/ui/popover/Popover.d.ts +11 -0
- package/dist/src/components/ui/popover/Popover.test.d.ts +1 -0
- package/dist/src/components/ui/skeleton/MonthSkeleton.d.ts +2 -0
- package/dist/src/components/ui/skeleton/MonthSkeleton.test.d.ts +1 -0
- package/dist/src/components/ui/skeleton/ScheduleSkeleton.d.ts +2 -0
- package/dist/src/components/ui/skeleton/ScheduleSkeleton.test.d.ts +1 -0
- package/dist/src/components/ui/skeleton/TimeGridSkeleton.d.ts +2 -0
- package/dist/src/components/ui/skeleton/TimeGridSkeleton.test.d.ts +1 -0
- package/dist/src/components/views/View.d.ts +4 -0
- package/dist/src/components/views/View.test.d.ts +1 -0
- package/dist/src/components/views/custom_days_view/CustomDaysView.d.ts +5 -0
- package/dist/src/components/views/custom_days_view/CustomDaysView.test.d.ts +1 -0
- package/dist/src/components/views/day_view/DayView.d.ts +5 -0
- package/dist/src/components/views/day_view/DayView.test.d.ts +1 -0
- package/dist/src/components/views/month_view/MonthView.d.ts +5 -0
- package/dist/src/components/views/month_view/MonthView.test.d.ts +1 -0
- package/dist/src/components/views/schedule_view/ScheduleView.d.ts +4 -0
- package/dist/src/components/views/schedule_view/ScheduleView.test.d.ts +1 -0
- package/dist/src/components/views/week_view/WeekView.d.ts +5 -0
- package/dist/src/components/views/week_view/WeekView.test.d.ts +1 -0
- package/dist/src/constants/calendar.d.ts +96 -0
- package/dist/src/constants/index.d.ts +2 -0
- package/dist/src/constants/theme.d.ts +38 -0
- package/dist/src/context/CalendarContext.d.ts +83 -0
- package/dist/src/context/CalendarContext.test.d.ts +1 -0
- package/dist/src/hooks/useAllDayBanner.d.ts +48 -0
- package/dist/src/hooks/useAllDayBanner.test.d.ts +1 -0
- package/dist/src/hooks/useCalendarProps.d.ts +10 -0
- package/dist/src/hooks/useColorScheme.d.ts +2 -0
- package/dist/src/hooks/useColorScheme.test.d.ts +1 -0
- package/dist/src/hooks/useDayEventLayout.d.ts +27 -0
- package/dist/src/hooks/useDayEventLayout.test.d.ts +1 -0
- package/dist/src/hooks/useEvents.d.ts +16 -0
- package/dist/src/hooks/useEvents.test.d.ts +1 -0
- package/dist/src/hooks/useMonthGrid.d.ts +44 -0
- package/dist/src/hooks/useMonthGrid.test.d.ts +1 -0
- package/dist/src/hooks/useResizeObserver.d.ts +13 -0
- package/dist/src/hooks/useResizeObserver.test.d.ts +1 -0
- package/dist/src/hooks/useScheduleView.d.ts +24 -0
- package/dist/src/hooks/useScheduleView.test.d.ts +1 -0
- package/dist/src/index.d.ts +13 -0
- package/dist/src/setupTests.d.ts +0 -0
- package/dist/src/stories/Accessibility.stories.d.ts +10 -0
- package/dist/src/stories/CustomDayView.stories.d.ts +10 -0
- package/dist/src/stories/Customization.stories.d.ts +29 -0
- package/dist/src/stories/DayView.stories.d.ts +11 -0
- package/dist/src/stories/Features.stories.d.ts +25 -0
- package/dist/src/stories/Localization.stories.d.ts +22 -0
- package/dist/src/stories/MonthView.stories.d.ts +13 -0
- package/dist/src/stories/QA/EdgeCases.stories.d.ts +12 -0
- package/dist/src/stories/QA/Interactions.stories.d.ts +8 -0
- package/dist/src/stories/QA/LayoutLimits.stories.d.ts +11 -0
- package/dist/src/stories/QA/Performance.stories.d.ts +9 -0
- package/dist/src/stories/QA/TimeFormatting.stories.d.ts +11 -0
- package/dist/src/stories/QA/Views.stories.d.ts +10 -0
- package/dist/src/stories/ScheduleView.stories.d.ts +10 -0
- package/dist/src/stories/WeekView.stories.d.ts +14 -0
- package/dist/src/types/calendar.d.ts +213 -0
- package/dist/src/types/events.d.ts +34 -0
- package/dist/src/types/index.d.ts +3 -0
- package/dist/src/types/theme.d.ts +81 -0
- package/dist/src/utils/common.d.ts +48 -0
- package/dist/src/utils/common.test.d.ts +1 -0
- package/dist/src/utils/contrast.d.ts +18 -0
- package/dist/src/utils/contrast.test.d.ts +1 -0
- package/dist/src/utils/date.d.ts +55 -0
- package/dist/src/utils/date.test.d.ts +1 -0
- package/dist/src/utils/formatting.d.ts +21 -0
- package/dist/src/utils/formatting.test.d.ts +1 -0
- package/dist/src/utils/index.d.ts +9 -0
- package/dist/stats.html +4950 -0
- package/package.json +56 -16
- package/dist/index.d.ts +0 -60
package/package.json
CHANGED
|
@@ -1,17 +1,17 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "calendar-simple",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "2.0.0-beta.1",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"description": "A user-friendly calendar app for viewing, selecting, and managing dates with data management capabilities.",
|
|
6
6
|
"main": "./dist/index.cjs.js",
|
|
7
7
|
"module": "./dist/index.es.js",
|
|
8
|
-
"types": "./dist/index.d.ts",
|
|
8
|
+
"types": "./dist/src/index.d.ts",
|
|
9
9
|
"files": [
|
|
10
10
|
"dist"
|
|
11
11
|
],
|
|
12
12
|
"exports": {
|
|
13
13
|
".": {
|
|
14
|
-
"types": "./dist/index.d.ts",
|
|
14
|
+
"types": "./dist/src/index.d.ts",
|
|
15
15
|
"import": "./dist/index.es.js",
|
|
16
16
|
"require": "./dist/index.cjs.js"
|
|
17
17
|
},
|
|
@@ -25,9 +25,25 @@
|
|
|
25
25
|
"access": "public"
|
|
26
26
|
},
|
|
27
27
|
"scripts": {
|
|
28
|
-
"build": "
|
|
28
|
+
"build": "vite build",
|
|
29
29
|
"storybook": "storybook dev -p 6006",
|
|
30
|
-
"build-storybook": "storybook build"
|
|
30
|
+
"build-storybook": "storybook build",
|
|
31
|
+
"lint": "eslint src",
|
|
32
|
+
"lint:fix": "eslint src --fix",
|
|
33
|
+
"format": "prettier --write .",
|
|
34
|
+
"format:check": "prettier --check .",
|
|
35
|
+
"test": "vitest run",
|
|
36
|
+
"test:watch": "vitest",
|
|
37
|
+
"prepare": "husky"
|
|
38
|
+
},
|
|
39
|
+
"lint-staged": {
|
|
40
|
+
"*.{js,ts,jsx,tsx}": [
|
|
41
|
+
"eslint --fix",
|
|
42
|
+
"prettier --write"
|
|
43
|
+
],
|
|
44
|
+
"*.{json,css,md}": [
|
|
45
|
+
"prettier --write"
|
|
46
|
+
]
|
|
31
47
|
},
|
|
32
48
|
"keywords": [
|
|
33
49
|
"calendar",
|
|
@@ -39,27 +55,51 @@
|
|
|
39
55
|
"dependencies": {
|
|
40
56
|
"calendarize": "^1.1.1",
|
|
41
57
|
"classnames": "^2.5.1",
|
|
42
|
-
"
|
|
58
|
+
"luxon": "^3.7.2"
|
|
43
59
|
},
|
|
44
60
|
"devDependencies": {
|
|
45
|
-
"@chromatic-com/storybook": "^5.
|
|
61
|
+
"@chromatic-com/storybook": "^5.1.1",
|
|
62
|
+
"@commitlint/cli": "^20.5.0",
|
|
63
|
+
"@commitlint/config-conventional": "^20.5.0",
|
|
64
|
+
"@eslint/js": "^10.0.1",
|
|
46
65
|
"@semantic-release/changelog": "^6.0.3",
|
|
47
66
|
"@semantic-release/git": "^10.0.1",
|
|
48
|
-
"@storybook/addon-docs": "^10.
|
|
49
|
-
"@storybook/react-vite": "^10.
|
|
50
|
-
"@
|
|
67
|
+
"@storybook/addon-docs": "^10.3.5",
|
|
68
|
+
"@storybook/react-vite": "^10.3.5",
|
|
69
|
+
"@testing-library/dom": "^10.4.1",
|
|
70
|
+
"@testing-library/jest-dom": "^6.9.1",
|
|
71
|
+
"@testing-library/react": "^16.3.2",
|
|
72
|
+
"@testing-library/user-event": "^14.6.1",
|
|
73
|
+
"@types/luxon": "^3.7.1",
|
|
74
|
+
"@types/node": "^25.5.2",
|
|
51
75
|
"@types/react": "^19.2.14",
|
|
52
76
|
"@types/react-dom": "^19.2.3",
|
|
53
|
-
"
|
|
77
|
+
"ajv": "^8.18.0",
|
|
78
|
+
"esbuild": "^0.28.0",
|
|
79
|
+
"eslint": "^10.2.0",
|
|
80
|
+
"eslint-config-prettier": "^10.1.8",
|
|
81
|
+
"eslint-plugin-react": "^7.37.5",
|
|
82
|
+
"eslint-plugin-react-hooks": "^7.0.1",
|
|
83
|
+
"globals": "^17.4.0",
|
|
84
|
+
"husky": "^9.1.7",
|
|
85
|
+
"jsdom": "^29.0.2",
|
|
86
|
+
"lint-staged": "^16.4.0",
|
|
54
87
|
"prettier": "^3.8.1",
|
|
88
|
+
"rollup-plugin-visualizer": "^7.0.1",
|
|
55
89
|
"semantic-release": "^25.0.3",
|
|
56
|
-
"storybook": "^10.
|
|
57
|
-
"typescript": "^
|
|
90
|
+
"storybook": "^10.3.5",
|
|
91
|
+
"typescript": "^6.0.2",
|
|
92
|
+
"typescript-eslint": "^8.58.1",
|
|
58
93
|
"vite": "npm:rolldown-vite@^7.3.1",
|
|
59
|
-
"vite-plugin-dts": "^4.5.4"
|
|
94
|
+
"vite-plugin-dts": "^4.5.4",
|
|
95
|
+
"vitest": "^4.1.3"
|
|
60
96
|
},
|
|
61
97
|
"peerDependencies": {
|
|
62
|
-
"react": "^19.2.
|
|
63
|
-
"react-dom": "^19.2.
|
|
98
|
+
"react": "^19.2.5",
|
|
99
|
+
"react-dom": "^19.2.5"
|
|
100
|
+
},
|
|
101
|
+
"overrides": {
|
|
102
|
+
"eslint": "$eslint",
|
|
103
|
+
"esbuild": "$esbuild"
|
|
64
104
|
}
|
|
65
105
|
}
|
package/dist/index.d.ts
DELETED
|
@@ -1,60 +0,0 @@
|
|
|
1
|
-
import { default as default_2 } from 'react';
|
|
2
|
-
|
|
3
|
-
declare function Calendar(props?: CalendarType): default_2.JSX.Element;
|
|
4
|
-
|
|
5
|
-
declare interface CalendarTheme {
|
|
6
|
-
default?: ThemeStyle;
|
|
7
|
-
selected?: ThemeStyle;
|
|
8
|
-
today?: ThemeStyle;
|
|
9
|
-
}
|
|
10
|
-
|
|
11
|
-
export declare interface CalendarType {
|
|
12
|
-
dayType?: EDayType;
|
|
13
|
-
data?: DataType[];
|
|
14
|
-
width?: number;
|
|
15
|
-
height?: number;
|
|
16
|
-
selectedDate?: Date;
|
|
17
|
-
onDateClick?: (date: Date) => void;
|
|
18
|
-
onEventClick?: (event: DataType) => void;
|
|
19
|
-
onMoreClick?: (date: Date) => void;
|
|
20
|
-
onMonthChange?: (date: Date) => void;
|
|
21
|
-
isSelectDate?: boolean;
|
|
22
|
-
className?: string;
|
|
23
|
-
headerClassName?: string;
|
|
24
|
-
tableClassName?: string;
|
|
25
|
-
tableDateClassName?: string;
|
|
26
|
-
dataClassName?: string;
|
|
27
|
-
selectedClassName?: string;
|
|
28
|
-
todayClassName?: string;
|
|
29
|
-
pastYearLength?: number;
|
|
30
|
-
futureYearLength?: number;
|
|
31
|
-
theme?: CalendarTheme;
|
|
32
|
-
maxEvents?: number;
|
|
33
|
-
}
|
|
34
|
-
|
|
35
|
-
export declare interface DataType {
|
|
36
|
-
startDate: string;
|
|
37
|
-
endDate?: string;
|
|
38
|
-
value: string;
|
|
39
|
-
color?: string;
|
|
40
|
-
}
|
|
41
|
-
|
|
42
|
-
export declare const DAY_TYPE: {
|
|
43
|
-
FULL_NAME: string;
|
|
44
|
-
HALF_NAME: string;
|
|
45
|
-
};
|
|
46
|
-
|
|
47
|
-
declare const _default: default_2.MemoExoticComponent<typeof Calendar>;
|
|
48
|
-
export default _default;
|
|
49
|
-
|
|
50
|
-
export declare enum EDayType {
|
|
51
|
-
fullName = "FULL",
|
|
52
|
-
halfName = "HALF"
|
|
53
|
-
}
|
|
54
|
-
|
|
55
|
-
declare interface ThemeStyle {
|
|
56
|
-
color?: string;
|
|
57
|
-
bgColor?: string;
|
|
58
|
-
}
|
|
59
|
-
|
|
60
|
-
export { }
|