@ehfuse/mui-form-controls 3.0.54 → 3.0.55

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/dist/types.d.ts CHANGED
@@ -19,6 +19,7 @@ import type { ButtonGroupProps as MuiButtonGroupProps } from "@mui/material/Butt
19
19
  import type { StepperProps as MuiStepperProps } from "@mui/material/Stepper";
20
20
  import type { SelectProps as MuiSelectProps, SelectChangeEvent } from "@mui/material/Select";
21
21
  import type { FormControlProps } from "@mui/material/FormControl";
22
+ import type { InputLabelProps } from "@mui/material/InputLabel";
22
23
  import type { InputBaseComponentProps } from "@mui/material/InputBase";
23
24
  import type { TextFieldProps as MuiBaseTextFieldProps } from "@mui/material/TextField";
24
25
  export type TextFieldProps = MuiTextFieldProps;
@@ -65,6 +66,11 @@ export type TextAreaProps = BaseTextFieldProps & {
65
66
  sx?: SxProps<Theme>;
66
67
  inputProps?: React.TextareaHTMLAttributes<HTMLTextAreaElement>;
67
68
  inputRef?: React.Ref<HTMLTextAreaElement>;
69
+ slotProps?: {
70
+ root?: Partial<FormControlProps>;
71
+ inputLabel?: Partial<InputLabelProps>;
72
+ htmlInput?: React.TextareaHTMLAttributes<HTMLTextAreaElement>;
73
+ };
68
74
  };
69
75
  export type CheckboxProps = Omit<MuiCheckboxProps, "checked" | "onChange" | "form"> & BaseTextFieldProps & LongPressToggleProps & {
70
76
  name?: string;
@@ -244,7 +250,6 @@ export type { SelectChangeEvent };
244
250
  */
245
251
  export type ValidatableTextFieldProps = {
246
252
  onValidationChange?: (isValid: boolean) => void;
247
- /** 컴포넌트에 따라 유효성 실패 시 notched outline·라벨 등에 적용(미지정 시 theme error). */
248
253
  invalidBorderColor?: string;
249
254
  };
250
255
  export type SearchTextFieldProps = TextFieldProps & BaseTextFieldProps & {
@@ -365,20 +370,11 @@ export type JuminInfo = {
365
370
  };
366
371
  /**
367
372
  * 주민등록번호 텍스트 필드 타입
368
- *
369
- * **오류 표시(테두리·라벨)**: MUI `error`(TextField)와 emitChange와 동일한 내부 유효성(생일·13자·체크섬)을
370
- * `finalError = Boolean(error) || (내부 실패)`로 병합한다. `error === true`이면 내부가 유효해도 항상 오류 스타일.
371
- *
372
- * `invalidBorderColor`(`ValidatableTextFieldProps`)는 `finalError`일 때
373
- * notched outline·`InputLabel`에 적용(미지정 시 `theme.palette.error`). `helperText` 색은 MUI 기본.
374
- *
375
- * @see isJuminValueInvalidState
376
373
  */
377
374
  export type JuminTextFieldProps = Omit<TextFieldProps, "type" | "onChange" | "value"> & BaseTextFieldProps & ValidatableTextFieldProps & {
378
375
  value?: string;
379
376
  mask?: boolean;
380
377
  maskColor?: string;
381
- /** `false`이면 13자리에서 체크섬 검사 생략(비마스킹만). */
382
378
  validateChecksum?: boolean;
383
379
  fontSize?: string | number;
384
380
  fontColor?: string;
@@ -14,4 +14,4 @@ export { DEFAULT_SPECIAL_CHARS, DEFAULT_PASSWORD_VALIDATION_RULES, validatePassw
14
14
  export { validateBusinessNumber } from "./biznum";
15
15
  export { validateCardNumber, detectCardBrand } from "./card";
16
16
  export type { CardBrand } from "./card";
17
- export { REGION_MAP, extractJuminInfo, validateJuminChecksum, validateJuminBirthDate, isJuminValueInvalidState, } from "./jumin";
17
+ export { REGION_MAP, extractJuminInfo, validateJuminChecksum, validateJuminBirthDate, } from "./jumin";
@@ -25,9 +25,3 @@ export declare function validateJuminChecksum(numbers: string): boolean;
25
25
  * 주민등록번호 생년월일 유효성 검증
26
26
  */
27
27
  export declare function validateJuminBirthDate(numbers: string): boolean;
28
- /**
29
- * JuminTextField(emitChange)와 동일한 규칙으로, 현재 앞/뒤 숫자를 이었을 때
30
- * 오류 UI(빨간 테두리)에 해당하는지. 값이 없으면 `false` (빨간 테두리 없음).
31
- * 부분 입력 중에도 (기존 동작) 오류로 처리된다.
32
- */
33
- export declare function isJuminValueInvalidState(fullValue: string, mask: boolean, validateChecksum: boolean): boolean;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ehfuse/mui-form-controls",
3
- "version": "3.0.54",
3
+ "version": "3.0.55",
4
4
  "description": "Material-UI form controls and text fields for complex forms",
5
5
  "private": false,
6
6
  "publishConfig": {
@@ -1,10 +0,0 @@
1
- /**
2
- * SwitchField.tsx
3
- *
4
- * @license MIT
5
- * @copyright 2025 김영진 (Kim Young Jin)
6
- * @author 김영진 (ehfuse@gmail.com)
7
- */
8
- import React from "react";
9
- import type { SwitchFieldProps } from "./types";
10
- export declare const SwitchField: React.ForwardRefExoticComponent<Omit<SwitchFieldProps, "ref"> & React.RefAttributes<HTMLButtonElement>>;
@@ -1,10 +0,0 @@
1
- /**
2
- * ToggleButtonGroupField.tsx
3
- *
4
- * @license MIT
5
- * @copyright 2025 김영진 (Kim Young Jin)
6
- * @author 김영진 (ehfuse@gmail.com)
7
- */
8
- import React from "react";
9
- import type { ToggleButtonGroupFieldProps } from "./types";
10
- export declare const ToggleButtonGroupField: React.ForwardRefExoticComponent<Omit<ToggleButtonGroupFieldProps, "ref"> & React.RefAttributes<HTMLDivElement>>;
@@ -1,35 +0,0 @@
1
- /**
2
- * 패키지 전역 개발용 콘솔 로그 스위치.
3
- * 앱 진입 시 `setMuiFormControlsDebug(true)` 한 번이면
4
- * DateTextField / TimeTextField / DateTimeTextField 등에서 value 동기화 로그가 출력된다.
5
- * 필드가 많으면 `nameIncludes` / `nameMatch`, 컴포넌트만 골라서는 `scopes`로 범위를 줄일 수 있다.
6
- *
7
- * @license MIT
8
- */
9
- /** value 동기화 로그를 낼 수 있는 컴포넌트 scope (muiFormControlsDevLog 첫 인자와 동일) */
10
- export type MuiFormControlsDebugScope = "DateTextField" | "TimeTextField" | "DateTimeTextField";
11
- export type MuiFormControlsDebugOptions = {
12
- /** `name` prop에 이 부분 문자열이 있을 때만 로그 (여러 필드일 때 노이즈 감소) */
13
- nameIncludes?: string;
14
- /** `name` prop이 이 정규식과 맞을 때만 로그 */
15
- nameMatch?: RegExp;
16
- /**
17
- * 한 개 이상이면 **이 컴포넌트(scope)에서만** 로그.
18
- * 생략 또는 빈 배열이면 scope 제한 없음(이름 필터만 적용).
19
- */
20
- scopes?: MuiFormControlsDebugScope[];
21
- };
22
- /**
23
- * @param enabled 로그 출력 여부
24
- * @param options `scopes` / `nameIncludes` / `nameMatch`로 범위 축소 (조건은 AND)
25
- */
26
- export declare function setMuiFormControlsDebug(enabled: boolean, options?: MuiFormControlsDebugOptions): void;
27
- export declare function getMuiFormControlsDebug(): boolean;
28
- export declare function getMuiFormControlsDebugOptions(): Readonly<MuiFormControlsDebugOptions & {
29
- enabled: boolean;
30
- }>;
31
- /**
32
- * 컴포넌트 내부 전용.
33
- * @param scope 예: "DateTextField"
34
- */
35
- export declare function muiFormControlsDevLog(scope: string, payload: Record<string, unknown>): void;
@@ -1,5 +0,0 @@
1
- import type { SxProps, Theme } from "@mui/material/styles";
2
- export declare const CLOSED_OUTLINED_BORDER_COLOR = "rgba(0, 0, 0, 0.23)";
3
- export declare const CLOSED_OUTLINED_LABEL_COLOR = "rgba(0, 0, 0, 0.6)";
4
- export declare const outlinedFieldFocusToneSx: SxProps<Theme>;
5
- export declare const outlinedFieldReadonlyToneSx: SxProps<Theme>;