@bbon/react-calendar 0.5.1 → 0.5.4

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.
@@ -1,30 +1,30 @@
1
- /// <reference types="react" />
2
- import { DateType } from './DateType';
3
- interface BoxProp {
4
- /** 날짜 */
5
- date?: DateType;
6
- /** 출력 문자열 */
7
- text?: string | number;
8
- /** 휴일여부 */
9
- isHoliday?: boolean;
10
- /** 이전달 여부 */
11
- isPreviousMonth?: boolean;
12
- /** 다음달 여부 */
13
- isNextMonth?: boolean;
14
- /** 오늘 여부 */
15
- isToday?: boolean;
16
- /** 선택여부 */
17
- isSelected?: boolean;
18
- /** 선택 시작 여부 */
19
- isSelectedStart?: boolean;
20
- /** 선택 종료 여부 */
21
- isSelectedEnd?: boolean;
22
- /** 선택가능여부 */
23
- canSelect: boolean;
24
- /** 오늘 하이라이트 여부 */
25
- highlightToday?: boolean;
26
- /** 날짜 클릭 처리기 */
27
- onClick?: (date: DateType) => void;
28
- }
29
- export declare const Box: ({ date, text, isHoliday, isPreviousMonth, isNextMonth, isToday, isSelected, isSelectedStart, isSelectedEnd, canSelect, highlightToday, onClick, }: BoxProp) => JSX.Element;
30
- export {};
1
+ import React from 'react';
2
+ import { DateType } from './DateType';
3
+ interface BoxProp {
4
+ /** 날짜 */
5
+ date?: DateType;
6
+ /** 출력 문자열 */
7
+ text?: string | number;
8
+ /** 휴일여부 */
9
+ isHoliday?: boolean;
10
+ /** 이전달 여부 */
11
+ isPreviousMonth?: boolean;
12
+ /** 다음달 여부 */
13
+ isNextMonth?: boolean;
14
+ /** 오늘 여부 */
15
+ isToday?: boolean;
16
+ /** 선택여부 */
17
+ isSelected?: boolean;
18
+ /** 선택 시작 여부 */
19
+ isSelectedStart?: boolean;
20
+ /** 선택 종료 여부 */
21
+ isSelectedEnd?: boolean;
22
+ /** 선택가능여부 */
23
+ canSelect: boolean;
24
+ /** 오늘 하이라이트 여부 */
25
+ highlightToday?: boolean;
26
+ /** 날짜 클릭 처리기 */
27
+ onClick?: (date: DateType) => void;
28
+ }
29
+ export declare const Box: ({ date, text, isHoliday, isPreviousMonth, isNextMonth, isToday, isSelected, isSelectedStart, isSelectedEnd, canSelect, highlightToday, onClick, }: BoxProp) => React.JSX.Element;
30
+ export {};
@@ -1,96 +1,96 @@
1
- import React from 'react';
2
- import { DateType } from './DateType';
3
- interface ButtonContentProps {
4
- previousYear?: React.ReactNode;
5
- previousMonth?: React.ReactNode;
6
- nextMonth?: React.ReactNode;
7
- nextYear?: React.ReactNode;
8
- }
9
- interface CalendarProps {
10
- /**
11
- * 달력 기준일자; 입력된 값이 없으면 오늘을 기준으로 달력을 렌더링합니다.
12
- *
13
- * @type {DateType}
14
- * @memberof CalendarProps
15
- */
16
- selection?: DateType;
17
- /**
18
- * 선택된 날짜
19
- *
20
- * @type {DateType[]}
21
- * @memberof CalendarProps
22
- */
23
- selections?: DateType[];
24
- /**
25
- * 연단위 이동 사용
26
- *
27
- * @type {boolean}
28
- * @memberof CalendarProps
29
- */
30
- useMoveToYear?: boolean;
31
- /**
32
- * 월 단위 이동 사용
33
- *
34
- * @type {boolean}
35
- * @memberof CalendarProps
36
- */
37
- useMoveToMonth?: boolean;
38
- /**
39
- * 선택 가능 날짜 제한 (최소값)
40
- *
41
- * @type {DateType}
42
- * @memberof CalendarProps
43
- */
44
- minDate?: DateType;
45
- /**
46
- * 선택 가능 날짜 제한 (최대값)
47
- *
48
- * @type {DateType}
49
- * @memberof CalendarProps
50
- */
51
- maxDate?: DateType;
52
- /**
53
- * 날짜 출력
54
- *
55
- * @type {boolean}
56
- * @memberof CalendarProps
57
- */
58
- showDate?: boolean;
59
- /**
60
- * 오늘 하이라이트 여부
61
- *
62
- * @type {boolean}
63
- * @memberof CalendarProps
64
- */
65
- highlightToday?: boolean;
66
- /**
67
- * 날짜 형식
68
- *
69
- * Default: YYYY-MM-DD
70
- *
71
- * @type {string}
72
- * @memberof CalendarProps
73
- */
74
- dateFormat?: string;
75
- /**
76
- * Button contents
77
- *
78
- * @type {ButtonContentProps}
79
- * @memberof CalendarProps
80
- */
81
- buttonContentProps?: ButtonContentProps;
82
- /**
83
- * 선택 변경 처리기
84
- * - 처리기가 설정되지 않으면 사용자가 선택을 변경할 수 없습니다.
85
- *
86
- * @memberof CalendarProps
87
- */
88
- onChange?: (start: DateType | undefined, end: DateType | undefined) => void;
89
- }
90
- /**
91
- * 달력으로 기간을 선택합니다.
92
- * @param {CalendarProps}
93
- * @returns
94
- */
95
- export declare const Calendar: ({ selection, selections, useMoveToYear, useMoveToMonth, minDate, maxDate, showDate, highlightToday, dateFormat, buttonContentProps, onChange, }: CalendarProps) => JSX.Element;
96
- export default Calendar;
1
+ import React from 'react';
2
+ import { DateType } from './DateType';
3
+ interface ButtonContentProps {
4
+ previousYear?: React.ReactNode;
5
+ previousMonth?: React.ReactNode;
6
+ nextMonth?: React.ReactNode;
7
+ nextYear?: React.ReactNode;
8
+ }
9
+ interface CalendarProps {
10
+ /**
11
+ * 달력 기준일자; 입력된 값이 없으면 오늘을 기준으로 달력을 렌더링합니다.
12
+ *
13
+ * @type {DateType}
14
+ * @memberof CalendarProps
15
+ */
16
+ selection?: DateType;
17
+ /**
18
+ * 선택된 날짜
19
+ *
20
+ * @type {DateType[]}
21
+ * @memberof CalendarProps
22
+ */
23
+ selections?: DateType[];
24
+ /**
25
+ * 연단위 이동 사용
26
+ *
27
+ * @type {boolean}
28
+ * @memberof CalendarProps
29
+ */
30
+ useMoveToYear?: boolean;
31
+ /**
32
+ * 월 단위 이동 사용
33
+ *
34
+ * @type {boolean}
35
+ * @memberof CalendarProps
36
+ */
37
+ useMoveToMonth?: boolean;
38
+ /**
39
+ * 선택 가능 날짜 제한 (최소값)
40
+ *
41
+ * @type {DateType}
42
+ * @memberof CalendarProps
43
+ */
44
+ minDate?: DateType;
45
+ /**
46
+ * 선택 가능 날짜 제한 (최대값)
47
+ *
48
+ * @type {DateType}
49
+ * @memberof CalendarProps
50
+ */
51
+ maxDate?: DateType;
52
+ /**
53
+ * 날짜 출력
54
+ *
55
+ * @type {boolean}
56
+ * @memberof CalendarProps
57
+ */
58
+ showDate?: boolean;
59
+ /**
60
+ * 오늘 하이라이트 여부
61
+ *
62
+ * @type {boolean}
63
+ * @memberof CalendarProps
64
+ */
65
+ highlightToday?: boolean;
66
+ /**
67
+ * 날짜 형식
68
+ *
69
+ * Default: YYYY-MM-DD
70
+ *
71
+ * @type {string}
72
+ * @memberof CalendarProps
73
+ */
74
+ dateFormat?: string;
75
+ /**
76
+ * Button contents
77
+ *
78
+ * @type {ButtonContentProps}
79
+ * @memberof CalendarProps
80
+ */
81
+ buttonContentProps?: ButtonContentProps;
82
+ /**
83
+ * 선택 변경 처리기
84
+ * - 처리기가 설정되지 않으면 사용자가 선택을 변경할 수 없습니다.
85
+ *
86
+ * @memberof CalendarProps
87
+ */
88
+ onChange?: (start: DateType | undefined, end: DateType | undefined) => void;
89
+ }
90
+ /**
91
+ * 달력으로 기간을 선택합니다.
92
+ * @param {CalendarProps}
93
+ * @returns
94
+ */
95
+ export declare const Calendar: ({ selection, selections, useMoveToYear, useMoveToMonth, minDate, maxDate, showDate, highlightToday, dateFormat, buttonContentProps, onChange, }: CalendarProps) => React.JSX.Element;
96
+ export default Calendar;
@@ -1,23 +1,23 @@
1
- import { DateType } from './DateType';
2
- export interface DateItem {
3
- /** 날짜 */
4
- date: DateType;
5
- /** 날짜 출력 */
6
- text: string;
7
- /** 이전달 여부 */
8
- isPreviousMonth: boolean;
9
- /** 다음달 여부 */
10
- isNextMonth: boolean;
11
- /** 휴일여부 (일요일) */
12
- isHoliday: boolean;
13
- /** 오늘여부 */
14
- isToday: boolean;
15
- /** 선택여부 */
16
- isSelected: boolean;
17
- /** 선택여부 (시작) */
18
- isSelectedStart: boolean;
19
- /** 선택여부 (종료) */
20
- isSelectedEnd: boolean;
21
- /** 선택가능여부 */
22
- canSelect: boolean;
23
- }
1
+ import { DateType } from './DateType';
2
+ export interface DateItem {
3
+ /** 날짜 */
4
+ date: DateType;
5
+ /** 날짜 출력 */
6
+ text: string;
7
+ /** 이전달 여부 */
8
+ isPreviousMonth: boolean;
9
+ /** 다음달 여부 */
10
+ isNextMonth: boolean;
11
+ /** 휴일여부 (일요일) */
12
+ isHoliday: boolean;
13
+ /** 오늘여부 */
14
+ isToday: boolean;
15
+ /** 선택여부 */
16
+ isSelected: boolean;
17
+ /** 선택여부 (시작) */
18
+ isSelectedStart: boolean;
19
+ /** 선택여부 (종료) */
20
+ isSelectedEnd: boolean;
21
+ /** 선택가능여부 */
22
+ canSelect: boolean;
23
+ }
@@ -1 +1 @@
1
- export declare type DateType = string;
1
+ export type DateType = string;
@@ -1,10 +1,10 @@
1
- export declare class DateUtil {
2
- /**
3
- * Date 형식을 확인합니다.
4
- *
5
- * @param {(Date | string | number)} value
6
- * @returns {Date}
7
- * @memberof Dates
8
- */
9
- static ensureDateValue(value: Date | string | number): Date;
10
- }
1
+ export declare class DateUtil {
2
+ /**
3
+ * Date 형식을 확인합니다.
4
+ *
5
+ * @param {(Date | string | number)} value
6
+ * @returns {Date}
7
+ * @memberof Dates
8
+ */
9
+ static ensureDateValue(value: Date | string | number): Date;
10
+ }
@@ -1,4 +1,4 @@
1
- export { default } from './Calendar';
2
- export * from './DateItem';
3
- export * from './DateUtil';
4
- export * from './DateType';
1
+ export { default } from './Calendar';
2
+ export * from './DateItem';
3
+ export * from './DateUtil';
4
+ export * from './DateType';