@uniai-fe/uds-primitives 0.12.6 → 0.12.7

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.
@@ -46,14 +46,6 @@ const defaultClockIcon = (
46
46
  </svg>
47
47
  );
48
48
 
49
- /**
50
- * Input Time Utility; 24시간 저장 문자열을 trigger draft로 변환한다.
51
- * @utility
52
- * @param {string} value `HH:mm` 또는 `HH:mm:ss` 저장값
53
- * @param {"12h" | "24h"} format 표시 형식
54
- * @desc 유효하지 않거나 빈 저장값은 빈 field와 `am` period로 초기화한다.
55
- * @return {InputTimeDraft} 표시용 field 문자열과 period
56
- */
57
49
  const getInputTimeDraft = (
58
50
  value: string,
59
51
  format: "12h" | "24h",
@@ -81,43 +73,11 @@ const getInputTimeDraft = (
81
73
  * 저장값은 24시간 `HH:mm` 또는 `HH:mm:ss` 문자열로 유지한다.
82
74
  * @component
83
75
  * @param {InputTimeTemplateProps} props
84
- * @property {string} [props.value] 제어형 24시간 저장값
85
- * @property {string} [props.defaultValue] 비제어 초기 24시간 저장값
86
- * @property {(value: string) => void} [props.onChange] 변경 핸들러
87
- * @property {(value: string) => void} [props.onValueChange] 변경 별칭
88
- * @property {string} [props.name] hidden input form name
89
- * @property {string} [props.form] hidden input form id
90
- * @property {UseFormRegisterReturn} [props.register] hidden input react-hook-form register 결과
91
- * @property {"primary" | "secondary" | "tertiary" | "table"} [props.priority="primary"] input priority
92
- * @property {"small" | "medium" | "large"} [props.size="medium"] input size
93
- * @property {"default" | "active" | "focused" | "success" | "error" | "disabled" | "loading"} [props.state="default"] input state
94
- * @property {boolean} [props.block=false] width 100% 여부
95
- * @property {"full" | "fit" | "fill" | "auto" | number | string} [props.width] width preset 또는 custom width
96
- * @property {string} [props.className] root className
97
- * @property {boolean} [props.disabled] disabled 여부
98
- * @property {boolean} [props.readOnly=false] readOnly 여부
99
- * @property {boolean} [props.required] hidden input required 여부
100
- * @property {string} [props.id] trigger root id
101
- * @property {"12h" | "24h"} [props.format="24h"] 표시 형식
102
- * @property {boolean} [props.withSeconds=false] 초 field 노출 여부
103
- * @property {boolean} [props.clearable=true] 삭제 action 노출 여부
104
- * @property {number} [props.hoursStep=1] 시 증감 단위
105
- * @property {number} [props.minutesStep=5] 분 증감 단위
106
- * @property {number} [props.secondsStep=1] 초 증감 단위
107
- * @property {ReactNode} [props.icon] clock icon override
108
- * @property {"left" | "right"} [props.iconPosition] clock icon 위치
109
- * @property {string} [props.iconLabel="시간 선택"] clock icon 접근성 라벨
110
- * @property {InputTimeHiddenInputProps} [props.hiddenInputProps] hidden input native props
111
- * @property {string} [props.hoursInputLabel="시"] 시 input 접근성 라벨
112
- * @property {string} [props.minutesInputLabel="분"] 분 input 접근성 라벨
113
- * @property {string} [props.secondsInputLabel="초"] 초 input 접근성 라벨
114
- * @property {string} [props.amPmInputLabel="오전 또는 오후"] 오전·오후 input 접근성 라벨
115
- * @property {string} [props.hoursPlaceholder="HH"] 시 placeholder
116
- * @property {string} [props.minutesPlaceholder="MM"] 분 placeholder
117
- * @property {string} [props.secondsPlaceholder="SS"] 초 placeholder
118
- * @property {(event: FocusEvent<HTMLInputElement>) => void} [props.onFocus] field focus 핸들러
119
- * @property {(event: FocusEvent<HTMLDivElement>) => void} [props.onBlur] trigger root blur 핸들러
120
- * @desc 표시 draft를 편집·정규화하고 TimePicker 선택값과 hidden input 저장값을 동기화한다.
76
+ * @param {"primary" | "secondary" | "tertiary" | "table"} [props.priority="primary"] input priority
77
+ * @param {"small" | "medium" | "large"} [props.size="medium"] input size
78
+ * @param {"12h" | "24h"} [props.format="24h"] 표시 형식
79
+ * @param {boolean} [props.withSeconds=false] field 노출 여부
80
+ * @returns {ReactNode} 시간 입력과 선택 panel
121
81
  */
122
82
  const InputTimeTemplate = forwardRef<HTMLDivElement, InputTimeTemplateProps>(
123
83
  (
@@ -176,7 +136,6 @@ const InputTimeTemplate = forwardRef<HTMLDivElement, InputTimeTemplateProps>(
176
136
  getInputTimeDraft(value ?? defaultValue ?? "", format),
177
137
  );
178
138
 
179
- // 외부 value 또는 표시 형식 변경 시 저장값을 기준으로 편집 draft를 다시 계산한다.
180
139
  useEffect(() => {
181
140
  setDraft(getInputTimeDraft(timeValue, format));
182
141
  }, [format, timeValue]);
@@ -206,13 +165,6 @@ const InputTimeTemplate = forwardRef<HTMLDivElement, InputTimeTemplateProps>(
206
165
  ? { width: widthValue }
207
166
  : undefined;
208
167
 
209
- /**
210
- * Input Time Utility; RHF hidden input 변경 이벤트 동기화 함수.
211
- * @utility
212
- * @param {string} nextValue 다음 24시간 저장값
213
- * @desc 표시 field와 분리된 hidden input register에 synthetic change를 전달한다.
214
- * @return {void}
215
- */
216
168
  const emitRegisterChange = useCallback(
217
169
  (nextValue: string) => {
218
170
  register?.onChange({
@@ -223,13 +175,6 @@ const InputTimeTemplate = forwardRef<HTMLDivElement, InputTimeTemplateProps>(
223
175
  [register],
224
176
  );
225
177
 
226
- /**
227
- * Input Time Utility; 시간 저장값 갱신 함수.
228
- * @utility
229
- * @param {string} nextValue 다음 24시간 저장값
230
- * @desc draft, controlled/uncontrolled value와 RHF 저장값을 같은 값으로 동기화한다.
231
- * @return {void}
232
- */
233
178
  const updateValue = useCallback(
234
179
  (nextValue: string) => {
235
180
  setDraft(getInputTimeDraft(nextValue, format));
@@ -239,13 +184,6 @@ const InputTimeTemplate = forwardRef<HTMLDivElement, InputTimeTemplateProps>(
239
184
  [emitRegisterChange, format, setTimeValue],
240
185
  );
241
186
 
242
- /**
243
- * Input Time Utility; 완성된 trigger draft를 저장값으로 commit한다.
244
- * @utility
245
- * @param {InputTimeDraft} nextDraft 다음 field 문자열과 period
246
- * @desc 필요한 field가 두 자리이고 범위가 유효할 때만 24시간 문자열로 직렬화한다.
247
- * @return {void}
248
- */
249
187
  const commitDraft = useCallback(
250
188
  (nextDraft: InputTimeDraft) => {
251
189
  const { hours, minutes, seconds } = nextDraft.fields;
@@ -286,14 +224,6 @@ const InputTimeTemplate = forwardRef<HTMLDivElement, InputTimeTemplateProps>(
286
224
  [format, updateValue, withSeconds],
287
225
  );
288
226
 
289
- /**
290
- * Input Time Utility; field 입력 정규화 함수.
291
- * @utility
292
- * @param {"hours" | "minutes" | "seconds"} unit 변경 단위
293
- * @param {string} rawValue 입력 문자열
294
- * @desc 숫자 두 자리만 draft에 남기고 완성된 값은 즉시 commit한다.
295
- * @return {void}
296
- */
297
227
  const handleFieldChange = (unit: TimePickerUnit, rawValue: string) => {
298
228
  const nextValue = rawValue.replace(/\D/g, "").slice(0, 2);
299
229
  const nextDraft = {
@@ -313,13 +243,6 @@ const InputTimeTemplate = forwardRef<HTMLDivElement, InputTimeTemplateProps>(
313
243
  onFocus?.(event);
314
244
  };
315
245
 
316
- /**
317
- * Input Time Utility; field blur 정규화 함수.
318
- * @utility
319
- * @param {"hours" | "minutes" | "seconds"} unit blur 단위
320
- * @desc 빈 field는 유지하고 입력값은 단위·표시 형식 범위로 clamp한 뒤 commit한다.
321
- * @return {void}
322
- */
323
246
  const handleFieldBlur = (unit: TimePickerUnit) => {
324
247
  const currentValue = draft.fields[unit];
325
248
  if (!currentValue) {
@@ -339,14 +262,6 @@ const InputTimeTemplate = forwardRef<HTMLDivElement, InputTimeTemplateProps>(
339
262
  commitDraft(nextDraft);
340
263
  };
341
264
 
342
- /**
343
- * Input Time Utility; field 방향키 증감 함수.
344
- * @utility
345
- * @param {"hours" | "minutes" | "seconds"} unit 활성 단위
346
- * @param {KeyboardEvent<HTMLInputElement>} event field keyboard event
347
- * @desc 위·아래 방향키만 단위별 step으로 순환 증감한다.
348
- * @return {void}
349
- */
350
265
  const handleFieldKeyDown = (
351
266
  unit: TimePickerUnit,
352
267
  event: KeyboardEvent<HTMLInputElement>,
@@ -365,13 +280,6 @@ const InputTimeTemplate = forwardRef<HTMLDivElement, InputTimeTemplateProps>(
365
280
  updateValue(stepTimeValue(timeValue, unit, amount * step, withSeconds));
366
281
  };
367
282
 
368
- /**
369
- * Input Time Utility; trigger stepper 증감 함수.
370
- * @utility
371
- * @param {1 | -1} amount 증감 방향
372
- * @desc focus된 단위가 있을 때만 해당 단위 step으로 저장값을 순환 증감한다.
373
- * @return {void}
374
- */
375
283
  const handleStep = (amount: 1 | -1) => {
376
284
  if (!activeUnit) {
377
285
  return;
@@ -392,13 +300,6 @@ const InputTimeTemplate = forwardRef<HTMLDivElement, InputTimeTemplateProps>(
392
300
  updateValue(nextValue);
393
301
  };
394
302
 
395
- /**
396
- * Input Time Utility; TimePicker 시 선택 반영 함수.
397
- * @utility
398
- * @param {number} hours 선택한 표시 시
399
- * @desc 12시간제는 현재 draft period를 결합해 24시간 저장 시로 변환한다.
400
- * @return {void}
401
- */
402
303
  const handleHourSelect = (hours: number) => {
403
304
  const parts = parseTimeValue(timeValue) ?? {
404
305
  hours: 0,
@@ -423,13 +324,6 @@ const InputTimeTemplate = forwardRef<HTMLDivElement, InputTimeTemplateProps>(
423
324
  updateValue(serializeTimeValue({ ...parts, minutes }, withSeconds));
424
325
  };
425
326
 
426
- /**
427
- * Input Time Utility; trigger root blur와 RHF touched 상태 동기화 함수.
428
- * @utility
429
- * @param {FocusEvent<HTMLDivElement>} event trigger root blur event
430
- * @desc root 내부 focus 이동은 무시하고 외부로 벗어날 때만 register와 소비자 callback을 호출한다.
431
- * @return {void}
432
- */
433
327
  const handleRootBlur = (event: FocusEvent<HTMLDivElement>) => {
434
328
  if (
435
329
  event.relatedTarget instanceof Node &&
@@ -445,13 +339,6 @@ const InputTimeTemplate = forwardRef<HTMLDivElement, InputTimeTemplateProps>(
445
339
  onBlur?.(event);
446
340
  };
447
341
 
448
- /**
449
- * Input Time Utility; TimePicker panel open 상태 갱신 함수.
450
- * @utility
451
- * @param {boolean} nextOpen 다음 open 상태
452
- * @desc disabled 또는 readOnly 상태에서는 panel을 열지 않는다.
453
- * @return {void}
454
- */
455
342
  const handleOpenChange = (nextOpen: boolean) => {
456
343
  setIsOpen(nextOpen && !isDisabled && !readOnly);
457
344
  };
@@ -12,34 +12,7 @@ import type { InputTimeTriggerProps } from "../../types";
12
12
  * Input Time trigger; 시·분·초 field와 focus 단위 stepper를 렌더한다.
13
13
  * @component
14
14
  * @param {InputTimeTriggerProps} props
15
- * @property {InputTimeTriggerFields} props.fields 시·분·초 입력값
16
- * @property {"am" | "pm"} props.period 오전·오후 구분
17
- * @property {"hours" | "minutes" | "seconds" | null} props.activeUnit 현재 활성 단위
18
- * @property {"primary" | "secondary" | "tertiary" | "table"} props.priority input priority
19
- * @property {"small" | "medium" | "large"} props.size input size
20
- * @property {"default" | "active" | "focused" | "success" | "error" | "disabled" | "loading"} props.state input state
21
- * @property {"12h" | "24h"} props.format 표시 형식
22
- * @property {boolean} props.withSeconds 초 field 노출 여부
23
- * @property {boolean} props.disabled 비활성화 여부
24
- * @property {boolean} props.readOnly 읽기 전용 여부
25
- * @property {ReactNode} props.icon clock icon
26
- * @property {"left" | "right"} props.iconPosition clock icon 위치
27
- * @property {string} props.iconLabel clock icon 접근성 라벨
28
- * @property {string} props.hoursInputLabel 시 input 접근성 라벨
29
- * @property {string} props.minutesInputLabel 분 input 접근성 라벨
30
- * @property {string} props.secondsInputLabel 초 input 접근성 라벨
31
- * @property {string} props.amPmInputLabel 오전·오후 input 접근성 라벨
32
- * @property {string} props.hoursPlaceholder 시 placeholder
33
- * @property {string} props.minutesPlaceholder 분 placeholder
34
- * @property {string} props.secondsPlaceholder 초 placeholder
35
- * @property {(unit: "hours" | "minutes" | "seconds", value: string) => void} props.onFieldChange field 변경 핸들러
36
- * @property {(unit: "hours" | "minutes" | "seconds", event: FocusEvent<HTMLInputElement>) => void} props.onFieldFocus field focus 핸들러
37
- * @property {(unit: "hours" | "minutes" | "seconds") => void} props.onFieldBlur field blur 핸들러
38
- * @property {(unit: "hours" | "minutes" | "seconds", event: KeyboardEvent<HTMLInputElement>) => void} props.onFieldKeyDown field keyboard 핸들러
39
- * @property {(period: "am" | "pm") => void} props.onPeriodChange 오전·오후 변경 핸들러
40
- * @property {(amount: 1 | -1) => void} props.onStep 활성 단위 증감 핸들러
41
- * @property {(event: FocusEvent<HTMLDivElement>) => void} props.onRootBlur root blur 핸들러
42
- * @desc field별 입력과 focus를 Template의 draft·commit pipeline으로 전달한다.
15
+ * @returns {ReactNode} 시간 입력 trigger
43
16
  */
44
17
  const InputTimeTrigger = forwardRef<HTMLDivElement, InputTimeTriggerProps>(
45
18
  (
@@ -100,13 +73,7 @@ const InputTimeTrigger = forwardRef<HTMLDivElement, InputTimeTriggerProps>(
100
73
  const onClockClick = () => {
101
74
  hoursRef.current?.focus();
102
75
  };
103
- /**
104
- * Input Time Utility; PopOver trigger click 위임 함수.
105
- * @utility
106
- * @param {MouseEvent<HTMLDivElement>} event trigger root click event
107
- * @desc field 편집 click은 panel을 toggle하지 않고 clock button click만 PopOver에 전달한다.
108
- * @return {void}
109
- */
76
+ // PopOver.Trigger가 주입한 click은 clock button에서만 popup toggle로 위임한다.
110
77
  const onRootClick = (event: MouseEvent<HTMLDivElement>) => {
111
78
  if (
112
79
  event.target instanceof Element &&
@@ -102,7 +102,7 @@
102
102
 
103
103
  .button-label {
104
104
  font-size: var(--font-body-xxsmall-size);
105
- line-height: 1.4;
105
+ line-height: 1em;
106
106
  font-weight: var(--font-body-medium-weight);
107
107
  letter-spacing: 0;
108
108
  }
@@ -82,7 +82,7 @@
82
82
 
83
83
  .button-label {
84
84
  font-size: var(--font-body-xxsmall-size);
85
- line-height: var(--font-body-xxsmall-line-height);
85
+ line-height: 1em;
86
86
  letter-spacing: var(--font-body-xxsmall-letter-spacing);
87
87
  font-weight: var(--font-body-xxsmall-weight);
88
88
  }
@@ -1,9 +1,4 @@
1
- import type {
2
- ComponentPropsWithoutRef,
3
- FocusEvent,
4
- MouseEvent,
5
- ReactNode,
6
- } from "react";
1
+ import type { MouseEvent, ReactNode } from "react";
7
2
  import type { UseFormRegisterReturn } from "react-hook-form";
8
3
  import type {
9
4
  CalendarColumns,
@@ -15,18 +10,7 @@ import type {
15
10
  CalendarRangeValue,
16
11
  CalendarValue,
17
12
  } from "../../calendar";
18
- import type { FormFieldWidth } from "../../form/types/props";
19
- import type { InputPriority, InputSize, InputState } from "./foundation";
20
-
21
- /**
22
- * Input Date hidden input props.
23
- * @typedef {Omit<ComponentPropsWithoutRef<"input">, "type" | "value" | "defaultValue" | "name">} InputCalendarHiddenInputProps
24
- * @desc Template이 고정하는 type, value, defaultValue와 name을 제외한 native hidden input 계약
25
- */
26
- export type InputCalendarHiddenInputProps = Omit<
27
- ComponentPropsWithoutRef<"input">,
28
- "type" | "value" | "defaultValue" | "name"
29
- >;
13
+ import type { InputPriority, InputState } from "./foundation";
30
14
 
31
15
  /**
32
16
  * Calendar trigger(Input) 영역에서 필요한 속성 묶음.
@@ -38,14 +22,8 @@ export type InputCalendarHiddenInputProps = Omit<
38
22
  * @property {boolean} [disabled] disabled 여부
39
23
  * @property {boolean} [readOnly] readOnly 여부
40
24
  * @property {string} [placeholder] trigger 내부 placeholder
41
- * @property {"primary" | "secondary" | "tertiary" | "table"} [priority] trigger input priority
42
- * @property {"small" | "medium" | "large"} [size] trigger input size
43
- * @property {"default" | "active" | "focused" | "success" | "error" | "disabled" | "loading"} [state] trigger input state
44
- * @property {boolean} [block] trigger width 100% 여부
45
- * @property {"full" | "fit" | "fill" | "auto" | number | string} [width] trigger width preset 또는 custom width
46
- * @property {(event: FocusEvent<HTMLInputElement>) => void} [onFocus] trigger focus 핸들러
47
- * @property {(event: FocusEvent<HTMLInputElement>) => void} [onBlur] trigger blur 핸들러
48
- * @desc Date trigger의 표시·상호작용 입력 계약. Template의 name/register는 hidden input 저장에 사용한다.
25
+ * @property {InputPriority} [priority] trigger input priority
26
+ * @property {InputState} [state] trigger input state
49
27
  */
50
28
  export interface InputCalendarTriggerProps {
51
29
  /**
@@ -81,38 +59,16 @@ export interface InputCalendarTriggerProps {
81
59
  * - table일 때 Trigger는 left icon 배치를 사용한다.
82
60
  */
83
61
  priority?: InputPriority;
84
- /**
85
- * "small" | "medium" | "large".
86
- */
87
- size?: InputSize;
88
62
  /**
89
63
  * trigger input state
90
64
  */
91
65
  state?: InputState;
92
- /**
93
- * trigger width 100% 여부.
94
- */
95
- block?: boolean;
96
- /**
97
- * "full" | "fit" | "fill" | "auto" | number | string.
98
- */
99
- width?: FormFieldWidth;
100
- /**
101
- * trigger focus 핸들러.
102
- */
103
- onFocus?: (event: FocusEvent<HTMLInputElement>) => void;
104
- /**
105
- * trigger blur 핸들러.
106
- */
107
- onBlur?: (event: FocusEvent<HTMLInputElement>) => void;
108
66
  }
109
67
 
110
68
  /**
111
69
  * Trigger view에서만 사용하는 부가 props.
112
70
  * @property {string} [className] trigger root className
113
71
  * @property {string} [displayValue] 표시 값 문자열
114
- * @see InputCalendarTriggerProps
115
- * @desc 기본 Date trigger가 InputFoundation.Base에 전달하는 view 계약
116
72
  */
117
73
  export interface InputCalendarTriggerViewProps extends InputCalendarTriggerProps {
118
74
  /**
@@ -134,14 +90,8 @@ export interface InputCalendarTriggerViewProps extends InputCalendarTriggerProps
134
90
  * @property {boolean} [disabled] disabled 여부
135
91
  * @property {boolean} [readOnly] readOnly 여부
136
92
  * @property {(event: MouseEvent<Element>) => void} [onClick] 트리거 클릭 핸들러
137
- * @property {"primary" | "secondary" | "tertiary" | "table"} [priority] trigger input priority
138
- * @property {"small" | "medium" | "large"} [size] trigger input size
139
- * @property {"default" | "active" | "focused" | "success" | "error" | "disabled" | "loading"} [state] trigger input state
140
- * @property {boolean} [block] trigger width 100% 여부
141
- * @property {"full" | "fit" | "fill" | "auto" | number | string} [width] trigger width preset 또는 custom width
142
- * @property {(event: FocusEvent<HTMLInputElement>) => void} [onFocus] trigger focus 핸들러
143
- * @property {(event: FocusEvent<HTMLInputElement>) => void} [onBlur] trigger blur 핸들러
144
- * @desc custom Date trigger에 전달하는 표시·상호작용 계약
93
+ * @property {InputPriority} [priority] trigger input priority
94
+ * @property {InputState} [state] trigger input state
145
95
  */
146
96
  export interface InputCalendarTriggerRenderProps {
147
97
  /**
@@ -177,92 +127,57 @@ export interface InputCalendarTriggerRenderProps {
177
127
  * - table일 때 Trigger는 left icon 배치를 사용한다.
178
128
  */
179
129
  priority?: InputPriority;
180
- /**
181
- * "small" | "medium" | "large".
182
- */
183
- size?: InputSize;
184
130
  /**
185
131
  * trigger input state
186
132
  */
187
133
  state?: InputState;
188
- /**
189
- * trigger width 100% 여부.
190
- */
191
- block?: boolean;
192
- /**
193
- * "full" | "fit" | "fill" | "auto" | number | string.
194
- */
195
- width?: FormFieldWidth;
196
- /**
197
- * trigger focus 핸들러.
198
- */
199
- onFocus?: (event: FocusEvent<HTMLInputElement>) => void;
200
- /**
201
- * trigger blur 핸들러.
202
- */
203
- onBlur?: (event: FocusEvent<HTMLInputElement>) => void;
204
134
  }
205
135
 
206
136
  /**
207
137
  * Input Calendar core props.
208
- * @property {"date" | "date-time" | "time"} [mode="date"] Calendar layout mode. 선택 body는 date로 유지된다.
209
- * @property {1 | 2} [columns=1] 동시에 노출할 달력 열 수
210
- * @property {string | null} [value] 제어형 값
211
- * @property {string | null} [defaultValue] 비제어 초기값
212
- * @property {(value: string | null) => void} [onChange] 값 변경 핸들러(직렬화 문자열 기준)
213
- * @property {(value: string | null) => void} [onValueChange] onChange 별칭(추가 파이프라인용)
138
+ * @property {CalendarMode} [mode="date"] 날짜/시간 모드
139
+ * @property {CalendarColumns} [columns=1] 동시에 노출할 달력 열 수
140
+ * @property {CalendarValue} [value] 제어형 값
141
+ * @property {CalendarValue} [defaultValue] 비제어 초기값
142
+ * @property {CalendarOnChange} [onChange] 값 변경 핸들러(직렬화 문자열 기준)
143
+ * @property {CalendarOnChange} [onValueChange] onChange 별칭(추가 파이프라인용)
214
144
  * @property {boolean} [readOnly] 읽기 전용 여부
215
145
  * @property {boolean} [disabled] disabled 여부
216
146
  * @property {CalendarDatePickerProps} [datePickerProps] Mantine DatePicker 직접 옵션
217
- * @property {string} [id] trigger id
218
- * @property {string} [name] hidden input form name
219
- * @property {UseFormRegisterReturn} [register] hidden input react-hook-form register 결과
220
- * @property {string} [placeholder] trigger 내부 placeholder
221
- * @property {(event: MouseEvent<Element>) => void} [onClick] trigger 클릭 핸들러
222
- * @property {"primary" | "secondary" | "tertiary" | "table"} [priority] trigger input priority
223
- * @property {"small" | "medium" | "large"} [size] trigger input size
224
- * @property {"default" | "active" | "focused" | "success" | "error" | "disabled" | "loading"} [state] trigger input state
225
- * @property {boolean} [block] trigger width 100% 여부
226
- * @property {"full" | "fit" | "fill" | "auto" | number | string} [width] trigger width preset 또는 custom width
227
- * @property {string} [form] hidden input이 연결될 form id
228
- * @property {boolean} [required] hidden input required 여부
229
- * @property {InputCalendarHiddenInputProps} [hiddenInputProps] Template 고정값을 제외한 hidden input native props
230
- * @property {(event: FocusEvent<HTMLInputElement>) => void} [onFocus] trigger focus 핸들러
231
- * @property {(event: FocusEvent<HTMLInputElement>) => void} [onBlur] trigger blur 핸들러와 RHF touched 동기화 진입점
147
+ * @property {InputPriority} [priority] trigger input priority
148
+ * @property {InputState} [state] trigger input state
232
149
  * @property {ReactNode} [header] 커스텀 header 콘텐츠
233
150
  * @property {ReactNode} [footer] 커스텀 footer 콘텐츠
234
151
  * @property {InputCalendarTexts} [texts] 기본 Date 문구
235
- * @property {unknown} [timePicker] 미구현 compatibility prop. 시간 선택에는 Input.Time.Template을 사용한다.
152
+ * @property {unknown} [timePicker] TimePicker 확장용 예약 슬롯(현재 미구현)
236
153
  * @property {boolean} [calendarOpened] calendar 열림 제어 여부
237
154
  * @property {(open: boolean) => void} [onCalendarOpen] calendar 열림 변경 이벤트
238
155
  * @property {ReactNode} [trigger] 커스텀 trigger 슬롯
239
156
  * @property {(props: InputCalendarTriggerRenderProps) => ReactNode} [renderTrigger] 커스텀 trigger 렌더 함수
240
- * @desc 단일 날짜 trigger, Calendar와 hidden form storage를 조합하는 공개 계약
241
157
  */
242
158
  export interface InputCalendarProps extends InputCalendarTriggerProps {
243
159
  /**
244
- * "date" | "date-time" | "time".
245
- * Calendar layout의 data-mode만 지정하며 선택 body는 date로 유지된다.
160
+ * 날짜/시간 모드
246
161
  */
247
162
  mode?: CalendarMode;
248
163
  /**
249
- * 1 | 2.
164
+ * 동시에 노출할 달력 열 수
250
165
  */
251
166
  columns?: CalendarColumns;
252
167
  /**
253
- * string | null.
168
+ * 제어형
254
169
  */
255
170
  value?: CalendarValue;
256
171
  /**
257
- * string | null.
172
+ * 비제어 초기값
258
173
  */
259
174
  defaultValue?: CalendarValue;
260
175
  /**
261
- * (value: string | null) => void.
176
+ * 변경 핸들러
262
177
  */
263
178
  onChange?: CalendarOnChange;
264
179
  /**
265
- * (value: string | null) => void. onChange 별칭으로 외부 파이프라인에 사용한다.
180
+ * onChange 별칭; 외부 파이프라인 시 사용
266
181
  */
267
182
  onValueChange?: CalendarOnChange;
268
183
  /**
@@ -290,8 +205,8 @@ export interface InputCalendarProps extends InputCalendarTriggerProps {
290
205
  */
291
206
  texts?: InputCalendarTexts;
292
207
  /**
293
- * TimePicker 확장용 미구현 compatibility prop.
294
- * @deprecated 시간 선택에는 Input.Time.Template을 사용한다.
208
+ * TimePicker 확장용 예약 슬롯(현재 미구현).
209
+ * 추후 Calendar Body 조합 확장 시점에 구체 타입을 확정한다.
295
210
  */
296
211
  timePicker?: unknown;
297
212
  /**
@@ -311,26 +226,14 @@ export interface InputCalendarProps extends InputCalendarTriggerProps {
311
226
  * 커스텀 trigger 렌더 함수
312
227
  */
313
228
  renderTrigger?: (props: InputCalendarTriggerRenderProps) => ReactNode;
314
- /**
315
- * hidden input이 연결될 form id.
316
- */
317
- form?: string;
318
- /**
319
- * hidden input required 여부.
320
- */
321
- required?: boolean;
322
- /**
323
- * Template 고정값을 제외한 hidden input native props.
324
- */
325
- hiddenInputProps?: InputCalendarHiddenInputProps;
326
229
  }
327
230
 
328
231
  /**
329
232
  * Input Calendar Range Template props.
330
- * @property {[string | null, string | null]} [value] 제어형 range 값
331
- * @property {[string | null, string | null]} [defaultValue] 비제어 range 초기값
332
- * @property {(value: [string | null, string | null]) => void} [onChange] range 값 변경 핸들러
333
- * @property {(value: [string | null, string | null]) => void} [onValueChange] onChange 별칭
233
+ * @property {CalendarRangeValue} [value] 제어형 range 값
234
+ * @property {CalendarRangeValue} [defaultValue] 비제어 range 초기값
235
+ * @property {CalendarRangeOnChange} [onChange] range 값 변경 핸들러
236
+ * @property {CalendarRangeOnChange} [onValueChange] onChange 별칭
334
237
  * @property {boolean} [readOnly] 읽기 전용 여부
335
238
  * @property {boolean} [disabled] disabled 여부
336
239
  * @property {CalendarRangeDatePickerProps} [datePickerProps] Mantine range DatePicker 옵션
@@ -339,17 +242,8 @@ export interface InputCalendarProps extends InputCalendarTriggerProps {
339
242
  * @property {UseFormRegisterReturn} [startRegister] 시작일 react-hook-form register 결과
340
243
  * @property {UseFormRegisterReturn} [endRegister] 종료일 react-hook-form register 결과
341
244
  * @property {string} [placeholder] trigger 내부 placeholder
342
- * @property {"primary" | "secondary" | "tertiary" | "table"} [priority] trigger input priority
343
- * @property {"small" | "medium" | "large"} [size] trigger input size
344
- * @property {"default" | "active" | "focused" | "success" | "error" | "disabled" | "loading"} [state] trigger input state
345
- * @property {boolean} [block] trigger width 100% 여부
346
- * @property {"full" | "fit" | "fill" | "auto" | number | string} [width] trigger width preset 또는 custom width
347
- * @property {string} [form] start/end hidden input이 연결될 공통 form id
348
- * @property {boolean} [required] start/end hidden input required 여부
349
- * @property {InputCalendarHiddenInputProps} [startHiddenInputProps] 시작일 hidden input native props
350
- * @property {InputCalendarHiddenInputProps} [endHiddenInputProps] 종료일 hidden input native props
351
- * @property {(event: FocusEvent<HTMLInputElement>) => void} [onFocus] trigger focus 핸들러
352
- * @property {(event: FocusEvent<HTMLInputElement>) => void} [onBlur] trigger blur 핸들러와 RHF touched 동기화 진입점
245
+ * @property {InputPriority} [priority] trigger input priority
246
+ * @property {InputState} [state] trigger input state
353
247
  * @property {ReactNode} [header] 커스텀 header 콘텐츠
354
248
  * @property {ReactNode} [footer] 커스텀 footer 콘텐츠
355
249
  * @property {InputCalendarTexts} [texts] 기본 Date 문구
@@ -359,23 +253,22 @@ export interface InputCalendarProps extends InputCalendarTriggerProps {
359
253
  * @property {ReactNode} [trigger] 커스텀 trigger 슬롯
360
254
  * @property {(props: InputCalendarTriggerRenderProps) => ReactNode} [renderTrigger] 커스텀 trigger 렌더 함수
361
255
  * @property {(event: MouseEvent<Element>) => void} [onClick] trigger 클릭 핸들러
362
- * @desc 기간 trigger, Calendar.Range와 start/end hidden form storage를 조합하는 공개 계약
363
256
  */
364
257
  export interface InputCalendarRangeProps {
365
258
  /**
366
- * [string | null, string | null].
259
+ * 제어형 range
367
260
  */
368
261
  value?: CalendarRangeValue;
369
262
  /**
370
- * [string | null, string | null].
263
+ * 비제어 range 초기값
371
264
  */
372
265
  defaultValue?: CalendarRangeValue;
373
266
  /**
374
- * (value: [string | null, string | null]) => void.
267
+ * range 변경 핸들러
375
268
  */
376
269
  onChange?: CalendarRangeOnChange;
377
270
  /**
378
- * (value: [string | null, string | null]) => void. onChange 별칭으로 외부 파이프라인에 사용한다.
271
+ * onChange 별칭; 외부 파이프라인 시 사용
379
272
  */
380
273
  onValueChange?: CalendarRangeOnChange;
381
274
  /**
@@ -415,46 +308,10 @@ export interface InputCalendarRangeProps {
415
308
  * - table일 때 Trigger는 left icon 배치를 사용한다.
416
309
  */
417
310
  priority?: InputPriority;
418
- /**
419
- * "small" | "medium" | "large".
420
- */
421
- size?: InputSize;
422
311
  /**
423
312
  * trigger input state
424
313
  */
425
314
  state?: InputState;
426
- /**
427
- * trigger width 100% 여부.
428
- */
429
- block?: boolean;
430
- /**
431
- * "full" | "fit" | "fill" | "auto" | number | string.
432
- */
433
- width?: FormFieldWidth;
434
- /**
435
- * start/end hidden input이 연결될 공통 form id.
436
- */
437
- form?: string;
438
- /**
439
- * start/end hidden input required 여부.
440
- */
441
- required?: boolean;
442
- /**
443
- * 시작일 hidden input native props.
444
- */
445
- startHiddenInputProps?: InputCalendarHiddenInputProps;
446
- /**
447
- * 종료일 hidden input native props.
448
- */
449
- endHiddenInputProps?: InputCalendarHiddenInputProps;
450
- /**
451
- * trigger focus 핸들러.
452
- */
453
- onFocus?: (event: FocusEvent<HTMLInputElement>) => void;
454
- /**
455
- * trigger blur 핸들러.
456
- */
457
- onBlur?: (event: FocusEvent<HTMLInputElement>) => void;
458
315
  /**
459
316
  * 커스텀 header 콘텐츠
460
317
  */