@ehfuse/mui-form-controls 3.0.56 → 3.0.57
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/LICENSE +21 -21
- package/dist/JuminTextField.d.ts +1 -0
- package/dist/TextArea.d.ts +5 -0
- package/dist/address.js.map +1 -1
- package/dist/address.mjs.map +1 -1
- package/dist/components/GroupedInputWrapper.d.ts +0 -2
- package/dist/index.d.ts +0 -1
- package/dist/index.js +2 -1
- package/dist/index.js.map +3 -3
- package/dist/index.mjs +2 -1
- package/dist/index.mjs.map +3 -3
- package/dist/types.d.ts +7 -10
- package/dist/utils/index.d.ts +1 -1
- package/dist/utils/jumin.d.ts +0 -6
- package/package.json +1 -1
- package/dist/SwitchField.d.ts +0 -10
- package/dist/ToggleButtonGroupField.d.ts +0 -10
- package/dist/devDebug.d.ts +0 -35
- package/dist/utils/outlinedFieldStyles.d.ts +0 -5
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 & {
|
|
@@ -293,6 +298,7 @@ export type PasswordValidationResult = {
|
|
|
293
298
|
};
|
|
294
299
|
export type PasswordTextFieldProps = Omit<TextFieldProps, "type"> & BaseTextFieldProps & Omit<ValidatableTextFieldProps, "onValidationChange"> & {
|
|
295
300
|
showToggle?: boolean;
|
|
301
|
+
preventAutoFill?: boolean;
|
|
296
302
|
validationRules?: PasswordValidationRules;
|
|
297
303
|
onValidationChange?: (result: PasswordValidationResult) => void;
|
|
298
304
|
};
|
|
@@ -365,20 +371,11 @@ export type JuminInfo = {
|
|
|
365
371
|
};
|
|
366
372
|
/**
|
|
367
373
|
* 주민등록번호 텍스트 필드 타입
|
|
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
374
|
*/
|
|
377
375
|
export type JuminTextFieldProps = Omit<TextFieldProps, "type" | "onChange" | "value"> & BaseTextFieldProps & ValidatableTextFieldProps & {
|
|
378
376
|
value?: string;
|
|
379
377
|
mask?: boolean;
|
|
380
378
|
maskColor?: string;
|
|
381
|
-
/** `false`이면 13자리에서 체크섬 검사 생략(비마스킹만). */
|
|
382
379
|
validateChecksum?: boolean;
|
|
383
380
|
fontSize?: string | number;
|
|
384
381
|
fontColor?: string;
|
package/dist/utils/index.d.ts
CHANGED
|
@@ -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,
|
|
17
|
+
export { REGION_MAP, extractJuminInfo, validateJuminChecksum, validateJuminBirthDate, } from "./jumin";
|
package/dist/utils/jumin.d.ts
CHANGED
|
@@ -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
package/dist/SwitchField.d.ts
DELETED
|
@@ -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>>;
|
package/dist/devDebug.d.ts
DELETED
|
@@ -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>;
|