@1d1s/design-system 2.8.0 → 2.10.0
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.
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
/** 월간 캘린더의 한 날짜에 붙는 지표. */
|
|
3
|
+
export interface MonthCalendarDay {
|
|
4
|
+
/** yyyy-MM-dd */
|
|
5
|
+
date: string;
|
|
6
|
+
/** 숫자 지표 — 0 초과이면 셀에 카운트/도트로 표시. */
|
|
7
|
+
count?: number;
|
|
8
|
+
/** 0~1 강도. indicator="intensity"일 때 배경 진하기. 미지정 시 count/maxCount로 자동. */
|
|
9
|
+
intensity?: number;
|
|
10
|
+
/** 이 날짜를 비활성(클릭 불가, 흐리게)으로 강제. 범위(min/max) 밖은 자동 비활성. */
|
|
11
|
+
disabled?: boolean;
|
|
12
|
+
}
|
|
13
|
+
export type MonthCalendarIndicator = "count" | "dot" | "intensity" | "none";
|
|
14
|
+
export interface MonthCalendarProps {
|
|
15
|
+
/** 날짜별 지표 목록. date(yyyy-MM-dd) 기준으로 매칭. */
|
|
16
|
+
days?: MonthCalendarDay[];
|
|
17
|
+
/** 지표 표현 방식. 기본 "count". */
|
|
18
|
+
indicator?: MonthCalendarIndicator;
|
|
19
|
+
/** 제어형: 표시할 월(그 달의 아무 날). onMonthChange와 함께 사용. */
|
|
20
|
+
month?: Date;
|
|
21
|
+
/** 비제어형 초기 월. 기본 오늘. */
|
|
22
|
+
defaultMonth?: Date;
|
|
23
|
+
onMonthChange?(month: Date): void;
|
|
24
|
+
/** 이동/활성 범위 하한·상한(yyyy-MM-dd). 이 범위 밖 날짜는 비활성, 밖 월로는 이동 불가. */
|
|
25
|
+
minDate?: string;
|
|
26
|
+
maxDate?: string;
|
|
27
|
+
/** 선택된 날짜(yyyy-MM-dd). */
|
|
28
|
+
selectedDate?: string;
|
|
29
|
+
onSelectDate?(date: string): void;
|
|
30
|
+
/** 오늘 기준일(SSR/테스트용 override). 기본 new Date(). */
|
|
31
|
+
today?: Date;
|
|
32
|
+
weekLabels?: string[];
|
|
33
|
+
className?: string;
|
|
34
|
+
}
|
|
35
|
+
/**
|
|
36
|
+
* MonthCalendar
|
|
37
|
+
* 컨테이너 너비를 꽉 채우는 월간 캘린더. 월 이동·요일 헤더·오늘 표시·
|
|
38
|
+
* 날짜별 지표(숫자/도트/강도)·선택 상태·범위 밖 비활성을 지원한다.
|
|
39
|
+
* 표 렌더러인 ScheduleCalendar와 달리 월 상태를 스스로 관리한다.
|
|
40
|
+
*/
|
|
41
|
+
export declare function MonthCalendar({ days, indicator, month, defaultMonth, onMonthChange, minDate, maxDate, selectedDate, onSelectDate, today, weekLabels, className, }: MonthCalendarProps): React.ReactElement;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './MonthCalendar';
|
|
@@ -25,6 +25,7 @@ export type { IconName, IconProps } from './Icons/Icon';
|
|
|
25
25
|
export * from './ImagePicker';
|
|
26
26
|
export * from './ImagePlaceholder';
|
|
27
27
|
export * from './MobileHeader';
|
|
28
|
+
export * from './MonthCalendar';
|
|
28
29
|
export * from './PageWatermark';
|
|
29
30
|
export * from './Pagination';
|
|
30
31
|
export * from './ProgressBar';
|