@team-frieeren/components 1.0.20 → 1.0.22

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 (27) hide show
  1. package/dist/Input.js +45 -28
  2. package/dist/components/Calendar/Month/MonthCalendar.d.ts +7 -0
  3. package/dist/components/Calendar/Month/MonthCalendar.stories.d.ts +40 -0
  4. package/dist/components/Calendar/Month/MonthCalendar.type.d.ts +102 -0
  5. package/dist/components/Calendar/Month/index.d.ts +2 -0
  6. package/dist/components/Calendar/Month/useMonthCalendar.d.ts +21 -0
  7. package/dist/components/Calendar/Week/WeekCalendar.d.ts +7 -0
  8. package/dist/components/Calendar/Week/WeekCalendar.stories.d.ts +32 -0
  9. package/dist/components/Calendar/Week/WeekCalendar.type.d.ts +72 -0
  10. package/dist/components/Calendar/Week/index.d.ts +2 -0
  11. package/dist/components/Calendar/Week/useWeekCalendar.d.ts +20 -0
  12. package/dist/components/Calendar/index.d.ts +4 -0
  13. package/dist/components/Calendar/shared/CalendarSlideTransition/CalendarSlideTransition.d.ts +3 -0
  14. package/dist/components/Calendar/shared/CalendarSlideTransition/index.d.ts +2 -0
  15. package/dist/components/Calendar/shared/CalendarSlideTransition/types.d.ts +10 -0
  16. package/dist/components/Calendar/shared/constants.d.ts +5 -0
  17. package/dist/components/Calendar/shared/types.d.ts +118 -0
  18. package/dist/components/Calendar/shared/utils.d.ts +22 -0
  19. package/dist/components/Input/input.type.d.ts +1 -1
  20. package/dist/components/Ripple/Ripple.d.ts +3 -0
  21. package/dist/components/Ripple/Ripple.stories.d.ts +14 -0
  22. package/dist/components/Ripple/Ripple.type.d.ts +31 -0
  23. package/dist/components/Ripple/index.d.ts +1 -0
  24. package/dist/index.css +1 -1
  25. package/dist/index.d.ts +2 -0
  26. package/dist/index.js +976 -42
  27. package/package.json +3 -1
package/dist/Input.js CHANGED
@@ -80,18 +80,17 @@ var Input = /*#__PURE__*/forwardRef(function (_a, ref) {
80
80
  display = _d === void 0 ? "box" : _d,
81
81
  _e = _a.disabled,
82
82
  disabled = _e === void 0 ? false : _e,
83
- _f = _a.error,
84
- error = _f === void 0 ? false : _f,
83
+ validate = _a.validate,
85
84
  onClear = _a.onClear,
86
85
  className = _a.className,
87
86
  value = _a.value,
88
87
  onChange = _a.onChange,
89
- _g = _a.placeholder,
90
- placeholder = _g === void 0 ? "텍스트를 입력하세요" : _g,
91
- rest = __rest(_a, ["type", "accept", "display", "disabled", "error", "onClear", "className", "value", "onChange", "placeholder"]);
92
- var _h = useState(false),
93
- hasFile = _h[0],
94
- setHasFile = _h[1];
88
+ _f = _a.placeholder,
89
+ placeholder = _f === void 0 ? "텍스트를 입력하세요" : _f,
90
+ rest = __rest(_a, ["type", "accept", "display", "disabled", "validate", "onClear", "className", "value", "onChange", "placeholder"]);
91
+ var _g = useState(false),
92
+ hasFile = _g[0],
93
+ setHasFile = _g[1];
95
94
  var handleChange = function handleChange(e) {
96
95
  if (type === "file") {
97
96
  setHasFile(!!(e.target.files && e.target.files.length > 0));
@@ -100,27 +99,45 @@ var Input = /*#__PURE__*/forwardRef(function (_a, ref) {
100
99
  onChange(e);
101
100
  }
102
101
  };
102
+ var getErrorMessage = function getErrorMessage() {
103
+ if (validate && value !== undefined) {
104
+ var validationError = validate(String(value));
105
+ if (validationError !== null) {
106
+ return validationError;
107
+ }
108
+ }
109
+ return "";
110
+ };
111
+ var errorMessage = getErrorMessage();
112
+ var hasError = !!errorMessage;
103
113
  return jsxs("div", {
104
- className: cx("input-wrapper", (_b = {}, _b["input--display-".concat(display)] = display, _b["input--disabled"] = disabled, _b["input--error"] = error, _b), className),
105
- children: [jsx("input", _assign({
106
- placeholder: placeholder,
107
- ref: ref,
108
- type: type,
109
- disabled: disabled,
110
- className: cx("input", {
111
- "has-file": hasFile
112
- }),
113
- "data-frieeren-component": "Input",
114
- onChange: handleChange
115
- }, rest)), type === "file" && jsx("button", {
116
- className: "input--action input--action-link",
117
- disabled: disabled,
118
- children: jsx(SvgLink, {})
119
- }), value && onClear && jsx("button", {
120
- onClick: onClear,
121
- className: "input--close",
122
- disabled: disabled,
123
- children: jsx(SvgClose, {})
114
+ className: cx("input-wrapper", (_b = {}, _b["input--display-".concat(display)] = display, _b["input--disabled"] = disabled, _b["input--error"] = hasError, _b), className),
115
+ children: [jsxs("div", {
116
+ className: "input-container",
117
+ children: [jsx("input", _assign({
118
+ placeholder: placeholder,
119
+ ref: ref,
120
+ type: type,
121
+ disabled: disabled,
122
+ className: cx("input", {
123
+ "has-file": hasFile
124
+ }),
125
+ "data-frieeren-component": "Input",
126
+ onChange: handleChange,
127
+ value: value
128
+ }, rest)), type === "file" && jsx("button", {
129
+ className: "input--action input--action-link",
130
+ disabled: disabled,
131
+ children: jsx(SvgLink, {})
132
+ }), value && onClear && jsx("button", {
133
+ onClick: onClear,
134
+ className: "input--close",
135
+ disabled: disabled,
136
+ children: jsx(SvgClose, {})
137
+ })]
138
+ }), errorMessage && jsx("span", {
139
+ className: "input--error-message",
140
+ children: errorMessage
124
141
  })]
125
142
  });
126
143
  });
@@ -0,0 +1,7 @@
1
+ import "./MonthCalendar.scss";
2
+ import type { MonthCalendarProps } from "./MonthCalendar.type";
3
+ declare const MonthCalendar: {
4
+ ({ minDate, maxDate, minMonth, maxMonth, initDate, tileSlot, onDateChange, onRangeChange, enableRange, showWeekNumbers, activeTransition, onlyViewMonthDays, weekNumbersCountry }: MonthCalendarProps): import("react/jsx-runtime").JSX.Element;
5
+ displayName: string;
6
+ };
7
+ export { MonthCalendar };
@@ -0,0 +1,40 @@
1
+ import type { StoryObj } from "@storybook/react";
2
+ declare const meta: {
3
+ title: string;
4
+ component: {
5
+ ({ minDate, maxDate, minMonth, maxMonth, initDate, tileSlot, onDateChange, onRangeChange, enableRange, showWeekNumbers, activeTransition, onlyViewMonthDays, weekNumbersCountry }: import("./MonthCalendar.type").MonthCalendarProps): import("react/jsx-runtime").JSX.Element;
6
+ displayName: string;
7
+ };
8
+ parameters: {
9
+ layout: string;
10
+ };
11
+ tags: string[];
12
+ argTypes: {
13
+ enableRange: {
14
+ control: "boolean";
15
+ description: string;
16
+ };
17
+ activeTransition: {
18
+ control: "boolean";
19
+ description: string;
20
+ };
21
+ showWeekNumbers: {
22
+ control: "boolean";
23
+ description: string;
24
+ };
25
+ weekNumbersCountry: {
26
+ control: "select";
27
+ options: string[];
28
+ description: string;
29
+ };
30
+ onlyViewMonthDays: {
31
+ control: "boolean";
32
+ description: string;
33
+ };
34
+ };
35
+ };
36
+ export default meta;
37
+ type Story = StoryObj<typeof meta>;
38
+ export declare const Default: Story;
39
+ export declare const WithRange: Story;
40
+ export declare const WithEvents: Story;
@@ -0,0 +1,102 @@
1
+ import type { WeekNumbers, HeaderTitle, WeekNumbersCountry, DateRange, BaseDateConditions, BaseCalendarProps, BaseCalendarHeaderProps, BaseCalendarTileProps, BaseCalendarWeekNumbersProps } from "../shared/types";
2
+ type MonthDateConditions = BaseDateConditions & {
3
+ /** 범위 선택 시작 날짜 여부 */
4
+ isRangeStart: boolean;
5
+ /** 범위 선택 종료 날짜 여부 */
6
+ isRangeEnd: boolean;
7
+ /** 범위 선택 중간 날짜 여부 */
8
+ isInRange: boolean;
9
+ /** 현재 월의 날짜만 표시 모드 여부 */
10
+ isOnlyViewMonthDays: boolean;
11
+ };
12
+ type MonthDayState = {
13
+ /** 날짜 객체 */
14
+ date: Date;
15
+ /** 해당 날짜의 상태 조건들 (Range 기능 포함) */
16
+ conditions: MonthDateConditions;
17
+ };
18
+ type TileSlotProps = {
19
+ /** 날짜 객체 */
20
+ date?: Date;
21
+ /** 날짜 조건들 */
22
+ conditions?: MonthDateConditions;
23
+ /** 기본 타일 내용 */
24
+ defaultContent: React.ReactNode;
25
+ };
26
+ type BaseMonthCalendarProps = BaseCalendarProps & {
27
+ /** 현재 월의 날짜만 표시할지 여부 */
28
+ onlyViewMonthDays?: boolean;
29
+ /** 커스텀 타일 렌더링 함수 */
30
+ tileSlot?: (props: TileSlotProps) => React.ReactNode;
31
+ };
32
+ type RangeMonthCalendarProps = BaseMonthCalendarProps & {
33
+ /** 범위 선택 모드 활성화 */
34
+ enableRange?: true;
35
+ /** 범위 선택 변경 핸들러 */
36
+ onRangeChange?: (range: DateRange) => void;
37
+ /** 단일 날짜 선택 핸들러 (범위 모드에서는 사용 불가) */
38
+ onDateChange?: never;
39
+ };
40
+ type SingleMonthCalendarProps = BaseMonthCalendarProps & {
41
+ /** 범위 선택 모드 비활성화 */
42
+ enableRange?: false;
43
+ /** 범위 선택 변경 핸들러 (단일 모드에서는 사용 불가) */
44
+ onRangeChange?: never;
45
+ /** 단일 날짜 선택 핸들러 */
46
+ onDateChange?: (date: Date) => void;
47
+ /** 커스텀 타일 렌더링 함수 */
48
+ tileSlot?: (props: TileSlotProps) => React.ReactNode;
49
+ };
50
+ /**
51
+ * 월 캘린더 컴포넌트 타입
52
+ * @description 범위 선택 모드 또는 단일 날짜 선택 모드 중 하나를 선택할 수 있습니다.
53
+ */
54
+ type MonthCalendarProps = RangeMonthCalendarProps | SingleMonthCalendarProps;
55
+ type MonthCalendarHeaderProps = BaseCalendarHeaderProps;
56
+ type MonthCalendarTileProps = BaseCalendarTileProps & {
57
+ /** 날짜 조건들 (Range 기능 포함) */
58
+ conditions?: MonthDateConditions;
59
+ /** 날짜 객체 (tileSlot에서 사용) */
60
+ date?: Date;
61
+ /** 커스텀 타일 렌더링 함수 */
62
+ tileSlot?: (props: TileSlotProps) => React.ReactNode;
63
+ };
64
+ type MonthCalendarDaysProps = {
65
+ /** 월 캘린더의 날짜 상태 배열 (주별로 그룹화) */
66
+ days: MonthDayState[][];
67
+ /** 날짜 클릭 핸들러 */
68
+ onDayClick: (date: Date) => void;
69
+ /** 커스텀 타일 렌더링 함수 */
70
+ tileSlot?: (props: TileSlotProps) => React.ReactNode;
71
+ };
72
+ type MonthCalendarWeekNumbersProps = BaseCalendarWeekNumbersProps;
73
+ /**
74
+ * 월 캘린더 훅 타입
75
+ * @description 월 캘린더 컴포넌트에서 사용하는 훅 타입
76
+ */
77
+ type UseMonthCalendarProps = {
78
+ initDate?: Date;
79
+ onDateChange?: (date: Date) => void;
80
+ onRangeChange?: (range: DateRange) => void;
81
+ minDate?: Date;
82
+ maxDate?: Date;
83
+ minMonth?: Date;
84
+ maxMonth?: Date;
85
+ enableRange: boolean;
86
+ onlyViewMonthDays: boolean;
87
+ };
88
+ /**
89
+ * 월 캘린더 날짜 상태 생성 타입
90
+ * @description 월 캘린더 날짜 상태 생성 타입
91
+ */
92
+ type CreateMonthDateStateProps = {
93
+ date: Date;
94
+ currentMonth: Date;
95
+ selectedDate: Date;
96
+ selectedRange: DateRange;
97
+ enableRange: boolean;
98
+ minDate?: Date;
99
+ maxDate?: Date;
100
+ onlyViewMonthDays: boolean;
101
+ };
102
+ export type { WeekNumbers, HeaderTitle, WeekNumbersCountry, DateRange, MonthDateConditions, MonthDayState, MonthCalendarProps, MonthCalendarHeaderProps, MonthCalendarWeekNumbersProps, MonthCalendarDaysProps, MonthCalendarTileProps, UseMonthCalendarProps, CreateMonthDateStateProps };
@@ -0,0 +1,2 @@
1
+ export { MonthCalendar } from "./MonthCalendar";
2
+ export type * from "./MonthCalendar.type";
@@ -0,0 +1,21 @@
1
+ import { SlideDirection } from "../shared/types";
2
+ import { DateRange, UseMonthCalendarProps, MonthDayState } from "./MonthCalendar.type";
3
+ /**
4
+ * 월 캘린더 훅
5
+ * @description 월 캘린더 훅
6
+ * @param {UseMonthCalendarProps} props
7
+ */
8
+ declare const useMonthCalendar: (props: UseMonthCalendarProps) => {
9
+ currentMonth: Date;
10
+ selectedDate: Date;
11
+ selectedRange: DateRange;
12
+ slideDirection: SlideDirection;
13
+ daysState: MonthDayState[][];
14
+ transitionKey: string;
15
+ isDisabledPrevMonth: boolean | undefined;
16
+ isDisabledNextMonth: boolean | undefined;
17
+ handleDayClick: (date: Date) => void;
18
+ handlePrevMonth: () => void;
19
+ handleNextMonth: () => void;
20
+ };
21
+ export default useMonthCalendar;
@@ -0,0 +1,7 @@
1
+ import "./WeekCalendar.scss";
2
+ import type { WeekCalendarProps } from "./WeekCalendar.type";
3
+ declare const WeekCalendar: {
4
+ ({ minDate, maxDate, minMonth, maxMonth, initDate, tileSlot, belowTileSlot, onDateChange, activeTransition, showWeekNumbers, weekNumbersCountry }: WeekCalendarProps): import("react/jsx-runtime").JSX.Element;
5
+ displayName: string;
6
+ };
7
+ export { WeekCalendar };
@@ -0,0 +1,32 @@
1
+ import type { StoryObj } from "@storybook/react";
2
+ declare const meta: {
3
+ title: string;
4
+ component: {
5
+ ({ minDate, maxDate, minMonth, maxMonth, initDate, tileSlot, belowTileSlot, onDateChange, activeTransition, showWeekNumbers, weekNumbersCountry }: import("./WeekCalendar.type").WeekCalendarProps): import("react/jsx-runtime").JSX.Element;
6
+ displayName: string;
7
+ };
8
+ parameters: {
9
+ layout: string;
10
+ };
11
+ tags: string[];
12
+ argTypes: {
13
+ activeTransition: {
14
+ control: "boolean";
15
+ description: string;
16
+ };
17
+ showWeekNumbers: {
18
+ control: "boolean";
19
+ description: string;
20
+ };
21
+ weekNumbersCountry: {
22
+ control: "select";
23
+ options: string[];
24
+ description: string;
25
+ };
26
+ };
27
+ };
28
+ export default meta;
29
+ type Story = StoryObj<typeof meta>;
30
+ export declare const Default: Story;
31
+ export declare const WithEvents: Story;
32
+ export declare const WithBelowTileSlot: Story;
@@ -0,0 +1,72 @@
1
+ import type { WeekNumbers, HeaderTitle, WeekNumbersCountry, SlideDirection, BaseDateConditions, BaseDayState, BaseCalendarProps, BaseCalendarHeaderProps, BaseCalendarTileProps, BaseCalendarWeekNumbersProps } from "../shared/types";
2
+ type WeekDateConditions = BaseDateConditions;
3
+ type WeekDayState = BaseDayState;
4
+ type TileSlotProps = {
5
+ /** 날짜 객체 */
6
+ date?: Date;
7
+ /** 날짜 조건들 */
8
+ conditions?: WeekDateConditions;
9
+ /** 기본 타일 내용 */
10
+ defaultContent: React.ReactNode;
11
+ };
12
+ /**
13
+ * 하단 타일 렌더링 함수 타입
14
+ * @description 하단 타일 렌더링 함수 타입
15
+ */
16
+ type BelowTileSlotProps = {
17
+ /** 날짜 객체 */
18
+ date?: Date;
19
+ };
20
+ type WeekCalendarProps = BaseCalendarProps & {
21
+ /** 날짜 선택 변경 핸들러 */
22
+ onDateChange?: (date: Date) => void;
23
+ /** 커스텀 타일 렌더링 함수 */
24
+ tileSlot?: (props: TileSlotProps) => React.ReactNode;
25
+ /** 하단 타일 렌더링 함수 */
26
+ belowTileSlot?: (props: BelowTileSlotProps) => React.ReactNode;
27
+ };
28
+ type WeekCalendarHeaderProps = BaseCalendarHeaderProps;
29
+ type WeekCalendarTileProps = BaseCalendarTileProps & {
30
+ /** 날짜 조건들 */
31
+ conditions?: WeekDateConditions;
32
+ /** 날짜 객체 (tileSlot에서 사용) */
33
+ date?: Date;
34
+ /** 커스텀 타일 렌더링 함수 */
35
+ tileSlot?: (props: TileSlotProps) => React.ReactNode;
36
+ /** 하단 타일 렌더링 함수 */
37
+ belowTileSlot?: (props: BelowTileSlotProps) => React.ReactNode;
38
+ };
39
+ type WeekCalendarDaysProps = {
40
+ /** 주 캘린더의 날짜 상태 배열 (주별로 그룹화) */
41
+ days: WeekDayState[][];
42
+ /** 날짜 클릭 핸들러 */
43
+ onDayClick: (date: Date) => void;
44
+ /** 커스텀 타일 렌더링 함수 */
45
+ tileSlot?: (props: TileSlotProps) => React.ReactNode;
46
+ /** 하단 타일 렌더링 함수 */
47
+ belowTileSlot?: (props: BelowTileSlotProps) => React.ReactNode;
48
+ };
49
+ type WeekCalendarWeekNumbersProps = BaseCalendarWeekNumbersProps;
50
+ /**
51
+ * 주 캘린더 훅 타입
52
+ * @description 주 캘린더 컴포넌트에서 사용하는 훅 타입
53
+ */
54
+ type UseWeekCalendarProps = {
55
+ initDate?: Date;
56
+ onDateChange?: (date: Date) => void;
57
+ minDate?: Date;
58
+ maxDate?: Date;
59
+ minMonth?: Date;
60
+ maxMonth?: Date;
61
+ };
62
+ /**
63
+ * 주 캘린더 날짜 상태 생성 타입
64
+ * @description 주 캘린더 날짜 상태 생성 타입
65
+ */
66
+ type CreateWeekDateStateProps = {
67
+ date: Date;
68
+ selectedDate: Date;
69
+ minDate?: Date;
70
+ maxDate?: Date;
71
+ };
72
+ export type { WeekNumbers, HeaderTitle, WeekNumbersCountry, SlideDirection, WeekDateConditions, WeekDayState, WeekCalendarProps, WeekCalendarHeaderProps, WeekCalendarWeekNumbersProps, WeekCalendarDaysProps, WeekCalendarTileProps, UseWeekCalendarProps, CreateWeekDateStateProps };
@@ -0,0 +1,2 @@
1
+ export { WeekCalendar } from "./WeekCalendar";
2
+ export type * from "./WeekCalendar.type";
@@ -0,0 +1,20 @@
1
+ import { SlideDirection } from "../shared/types";
2
+ import { UseWeekCalendarProps } from "./WeekCalendar.type";
3
+ /**
4
+ * 주 캘린더 훅
5
+ * @description 주 캘린더 훅
6
+ * @param {UseWeekCalendarProps} props
7
+ */
8
+ declare const useWeekCalendar: (props: UseWeekCalendarProps) => {
9
+ currentWeek: Date;
10
+ selectedDate: Date;
11
+ slideDirection: SlideDirection;
12
+ daysState: import("../shared/types").BaseDayState[][];
13
+ transitionKey: string;
14
+ isDisabledPrevMonth: boolean | undefined;
15
+ isDisabledNextMonth: boolean | undefined;
16
+ handleDayClick: (date: Date) => void;
17
+ handlePrevMonth: () => void;
18
+ handleNextMonth: () => void;
19
+ };
20
+ export default useWeekCalendar;
@@ -0,0 +1,4 @@
1
+ export { MonthCalendar } from "./Month";
2
+ export type * from "./Month/MonthCalendar.type";
3
+ export { WeekCalendar } from "./Week";
4
+ export type * from "./Week/WeekCalendar.type";
@@ -0,0 +1,3 @@
1
+ import type { CalendarSlideTransitionProps } from "./types";
2
+ import "./CalendarSlideTransition.scss";
3
+ export declare const CalendarSlideTransition: ({ calendarVariant, children, transitionKey, slideDirection, activeTransition }: CalendarSlideTransitionProps) => import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,2 @@
1
+ export { CalendarSlideTransition } from "./CalendarSlideTransition";
2
+ export type * from "./types";
@@ -0,0 +1,10 @@
1
+ type CalendarVariants = "month" | "week";
2
+ type SlideDirection = "left" | "right";
3
+ type CalendarSlideTransitionProps = {
4
+ calendarVariant: CalendarVariants;
5
+ children: React.ReactElement;
6
+ transitionKey: string;
7
+ slideDirection: SlideDirection;
8
+ activeTransition: boolean;
9
+ };
10
+ export type { CalendarVariants, SlideDirection, CalendarSlideTransitionProps };
@@ -0,0 +1,5 @@
1
+ import type { WeekNumbers, HeaderTitle } from "./types";
2
+ declare const MONTH_WEEK_NUMBERS: WeekNumbers;
3
+ declare const WEEK_WEEK_NUMBERS: WeekNumbers;
4
+ declare const HEADER_TITLE: HeaderTitle;
5
+ export { MONTH_WEEK_NUMBERS, WEEK_WEEK_NUMBERS, HEADER_TITLE };
@@ -0,0 +1,118 @@
1
+ /**
2
+ * 캘린더 언어 설정 타입
3
+ * @description 한국어(kr) 또는 영어(en) 지원
4
+ */
5
+ export type WeekNumbersCountry = "kr" | "en";
6
+ /**
7
+ * 요일 표시 텍스트 매핑 타입
8
+ * @description 언어별 요일 배열 (일~토 또는 S~S)
9
+ */
10
+ export type WeekNumbers = Record<WeekNumbersCountry, string[]>;
11
+ /**
12
+ * 헤더 제목 포맷 매핑 타입
13
+ * @description 언어별 날짜 포맷 문자열 (예: "yyyy. MM")
14
+ */
15
+ export type HeaderTitle = Record<WeekNumbersCountry, string>;
16
+ /**
17
+ * 슬라이드 전환 방향 타입
18
+ * @description 캘린더 월/주 전환 시 애니메이션 방향
19
+ */
20
+ export type SlideDirection = "left" | "right";
21
+ /**
22
+ * 날짜 범위 선택 타입
23
+ * @description 시작일과 종료일을 포함하는 범위 (Month Calendar 전용)
24
+ */
25
+ export type DateRange = {
26
+ /** 범위 시작 날짜 */
27
+ start: Date | null;
28
+ /** 범위 종료 날짜 */
29
+ end: Date | null;
30
+ };
31
+ /**
32
+ * 기본 날짜 조건 타입
33
+ * @description 모든 캘린더에서 공통으로 사용하는 날짜 상태 조건들
34
+ */
35
+ export type BaseDateConditions = {
36
+ /** 오늘 날짜 여부 */
37
+ isToday: boolean;
38
+ /** 주말 여부 (토, 일) */
39
+ isWeekend: boolean;
40
+ /** 비활성화 여부 (minDate/maxDate 범위 외) */
41
+ isDisabled: boolean;
42
+ /** 선택된 날짜 여부 */
43
+ isSelected: boolean;
44
+ /** 다른 월의 날짜 여부 (Month Calendar에서 사용) */
45
+ isOtherMonth: boolean;
46
+ };
47
+ /**
48
+ * 기본 날짜 상태 타입
49
+ * @description 날짜와 해당 날짜의 조건들을 포함하는 기본 구조
50
+ */
51
+ export type BaseDayState = {
52
+ /** 날짜 객체 */
53
+ date: Date;
54
+ /** 해당 날짜의 상태 조건들 */
55
+ conditions: BaseDateConditions;
56
+ };
57
+ /**
58
+ * 기본 캘린더 Props 타입
59
+ * @description 모든 캘린더 컴포넌트에서 공통으로 사용하는 기본 속성들
60
+ */
61
+ export type BaseCalendarProps = {
62
+ /** 선택 가능한 최소 날짜 */
63
+ minDate?: Date;
64
+ /** 선택 가능한 최대 날짜 */
65
+ maxDate?: Date;
66
+ /** 탐색 가능한 최소 월 */
67
+ minMonth?: Date;
68
+ /** 탐색 가능한 최대 월 */
69
+ maxMonth?: Date;
70
+ /** 초기 선택/표시 날짜 */
71
+ initDate?: Date;
72
+ /** 슬라이드 전환 애니메이션 활성화 여부 */
73
+ activeTransition?: boolean;
74
+ /** 요일 표시 여부 */
75
+ showWeekNumbers?: boolean;
76
+ /** 언어 설정 */
77
+ weekNumbersCountry?: WeekNumbersCountry;
78
+ };
79
+ /**
80
+ * 기본 캘린더 헤더 Props 타입
81
+ * @description 캘린더 상단 네비게이션 헤더의 공통 속성들
82
+ */
83
+ export type BaseCalendarHeaderProps = {
84
+ /** 현재 표시 중인 날짜 (월/주) */
85
+ selectedDate: Date;
86
+ /** 이전 월/주 이동 핸들러 */
87
+ onPrevMonth: () => void;
88
+ /** 다음 월/주 이동 핸들러 */
89
+ onNextMonth: () => void;
90
+ /** 이전 버튼 비활성화 여부 */
91
+ disabledPrevMonth?: boolean;
92
+ /** 다음 버튼 비활성화 여부 */
93
+ disabledNextMonth?: boolean;
94
+ /** 언어 설정 */
95
+ weekNumbersCountry: WeekNumbersCountry;
96
+ };
97
+ /**
98
+ * 기본 캘린더 타일 Props 타입
99
+ * @description 개별 날짜 타일 또는 요일 타일의 공통 속성들
100
+ */
101
+ export type BaseCalendarTileProps = {
102
+ /** 타일 유형 ("day" | "week-number") */
103
+ type: "day" | "week-number";
104
+ /** 날짜 조건들 (day 타입일 때만 사용) */
105
+ conditions?: BaseDateConditions;
106
+ /** 클릭 핸들러 */
107
+ onClick?: () => void;
108
+ /** 타일 내용 (날짜 숫자 또는 요일 텍스트) */
109
+ children: React.ReactNode;
110
+ };
111
+ /**
112
+ * 기본 요일 표시 Props 타입
113
+ * @description 캘린더 상단 요일 표시 영역의 공통 속성들
114
+ */
115
+ export type BaseCalendarWeekNumbersProps = {
116
+ /** 언어 설정 */
117
+ weekNumbersCountry: WeekNumbersCountry;
118
+ };
@@ -0,0 +1,22 @@
1
+ import type { DateRange } from "../shared/types";
2
+ declare const chunk: <T>(array: T[], size: number) => T[][];
3
+ declare const getDate: (date: Date) => number;
4
+ declare const isCurrentMonth: (date: Date, selectedDate: Date) => boolean;
5
+ declare const getFormattedDate: (date: Date) => string;
6
+ declare const currentWeekDays: (date: Date) => Date[];
7
+ declare const currentMonthDays: (date: Date) => Date[];
8
+ declare const isDisabledDay: (date: Date, minDate?: Date, maxDate?: Date) => boolean;
9
+ declare const isBeforeWeek: (date: Date, minDate: Date) => boolean;
10
+ declare const isAfterWeek: (date: Date, maxDate: Date) => boolean;
11
+ declare const isBeforeMonth: (date: Date, minDate: Date) => boolean;
12
+ declare const isAfterMonth: (date: Date, maxDate: Date) => boolean;
13
+ declare const isRangeStart: (date: Date, range: DateRange) => boolean;
14
+ declare const isRangeEnd: (date: Date, range: DateRange) => boolean;
15
+ declare const isInRange: (date: Date, range: DateRange) => boolean;
16
+ declare const isDateInRange: (date: Date, range: DateRange) => {
17
+ isSelected: boolean;
18
+ isRangeStart: boolean;
19
+ isRangeEnd: boolean;
20
+ isInRange: boolean;
21
+ };
22
+ export { chunk, getDate, isCurrentMonth, currentWeekDays, getFormattedDate, currentMonthDays, isDisabledDay, isBeforeWeek, isAfterWeek, isBeforeMonth, isAfterMonth, isRangeStart, isRangeEnd, isInRange, isDateInRange };
@@ -4,7 +4,7 @@ export interface InputProps extends React.InputHTMLAttributes<HTMLInputElement>
4
4
  type?: InputTypes;
5
5
  display?: InputDisplay;
6
6
  disabled?: boolean;
7
- error?: boolean;
7
+ validate?: (value: string) => string | null;
8
8
  onClear?: () => void;
9
9
  className?: string;
10
10
  }
@@ -0,0 +1,3 @@
1
+ import type { RippleProps } from "./Ripple.type";
2
+ export declare const Ripple: ({ color, duration, center, disabled, className, style }: RippleProps) => import("react/jsx-runtime").JSX.Element;
3
+ export default Ripple;
@@ -0,0 +1,14 @@
1
+ import type { Meta, StoryObj } from "@storybook/react";
2
+ import { Ripple } from "./Ripple";
3
+ declare const meta: Meta<typeof Ripple>;
4
+ export default meta;
5
+ type Story = StoryObj<typeof meta>;
6
+ export declare const Default: Story;
7
+ export declare const CustomColor: Story;
8
+ export declare const SlowAnimation: Story;
9
+ export declare const CenterRipple: Story;
10
+ export declare const Disabled: Story;
11
+ export declare const CardWithRipple: Story;
12
+ export declare const IconButton: Story;
13
+ export declare const WithButton: Story;
14
+ export declare const MultipleExamples: Story;
@@ -0,0 +1,31 @@
1
+ import React from "react";
2
+ export interface RippleProps {
3
+ /** 리플 효과 색상 */
4
+ color?: string;
5
+ /** 애니메이션 지속 시간 (ms) */
6
+ duration?: number;
7
+ /** 중앙에서 시작하는 리플 효과 여부 */
8
+ center?: boolean;
9
+ /** 리플 효과 비활성화 여부 */
10
+ disabled?: boolean;
11
+ /** 추가 CSS 클래스명 */
12
+ className?: string;
13
+ /** 추가 스타일 */
14
+ style?: React.CSSProperties;
15
+ }
16
+ export interface RippleState {
17
+ /** 클릭한 X 좌표 */
18
+ x: number;
19
+ /** 클릭한 Y 좌표 */
20
+ y: number;
21
+ /** 리플 크기 */
22
+ size: number;
23
+ }
24
+ export interface DebounceRippleProps {
25
+ /** 리플 효과 배열 개수 */
26
+ rippleCount: number;
27
+ /** 리플 효과 지속 시간 */
28
+ duration: number;
29
+ /** 리플 효과 정리 함수 */
30
+ cleanUpFunction: () => void;
31
+ }
@@ -0,0 +1 @@
1
+ export { Ripple } from "./Ripple";