@ehfuse/mui-form-controls 3.0.55 → 3.0.56
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 +0 -1
- package/dist/SwitchField.d.ts +10 -0
- package/dist/TextArea.d.ts +0 -5
- package/dist/ToggleButtonGroupField.d.ts +10 -0
- package/dist/address.js.map +1 -1
- package/dist/address.mjs.map +1 -1
- package/dist/components/GroupedInputWrapper.d.ts +2 -0
- package/dist/devDebug.d.ts +35 -0
- package/dist/index.d.ts +1 -0
- package/dist/index.js +1 -2
- package/dist/index.js.map +3 -3
- package/dist/index.mjs +1 -2
- package/dist/index.mjs.map +3 -3
- package/dist/types.d.ts +10 -6
- package/dist/utils/index.d.ts +1 -1
- package/dist/utils/jumin.d.ts +6 -0
- package/dist/utils/outlinedFieldStyles.d.ts +5 -0
- package/package.json +1 -1
package/dist/types.d.ts
CHANGED
|
@@ -19,7 +19,6 @@ 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";
|
|
23
22
|
import type { InputBaseComponentProps } from "@mui/material/InputBase";
|
|
24
23
|
import type { TextFieldProps as MuiBaseTextFieldProps } from "@mui/material/TextField";
|
|
25
24
|
export type TextFieldProps = MuiTextFieldProps;
|
|
@@ -66,11 +65,6 @@ export type TextAreaProps = BaseTextFieldProps & {
|
|
|
66
65
|
sx?: SxProps<Theme>;
|
|
67
66
|
inputProps?: React.TextareaHTMLAttributes<HTMLTextAreaElement>;
|
|
68
67
|
inputRef?: React.Ref<HTMLTextAreaElement>;
|
|
69
|
-
slotProps?: {
|
|
70
|
-
root?: Partial<FormControlProps>;
|
|
71
|
-
inputLabel?: Partial<InputLabelProps>;
|
|
72
|
-
htmlInput?: React.TextareaHTMLAttributes<HTMLTextAreaElement>;
|
|
73
|
-
};
|
|
74
68
|
};
|
|
75
69
|
export type CheckboxProps = Omit<MuiCheckboxProps, "checked" | "onChange" | "form"> & BaseTextFieldProps & LongPressToggleProps & {
|
|
76
70
|
name?: string;
|
|
@@ -250,6 +244,7 @@ export type { SelectChangeEvent };
|
|
|
250
244
|
*/
|
|
251
245
|
export type ValidatableTextFieldProps = {
|
|
252
246
|
onValidationChange?: (isValid: boolean) => void;
|
|
247
|
+
/** 컴포넌트에 따라 유효성 실패 시 notched outline·라벨 등에 적용(미지정 시 theme error). */
|
|
253
248
|
invalidBorderColor?: string;
|
|
254
249
|
};
|
|
255
250
|
export type SearchTextFieldProps = TextFieldProps & BaseTextFieldProps & {
|
|
@@ -370,11 +365,20 @@ export type JuminInfo = {
|
|
|
370
365
|
};
|
|
371
366
|
/**
|
|
372
367
|
* 주민등록번호 텍스트 필드 타입
|
|
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
|
|
373
376
|
*/
|
|
374
377
|
export type JuminTextFieldProps = Omit<TextFieldProps, "type" | "onChange" | "value"> & BaseTextFieldProps & ValidatableTextFieldProps & {
|
|
375
378
|
value?: string;
|
|
376
379
|
mask?: boolean;
|
|
377
380
|
maskColor?: string;
|
|
381
|
+
/** `false`이면 13자리에서 체크섬 검사 생략(비마스킹만). */
|
|
378
382
|
validateChecksum?: boolean;
|
|
379
383
|
fontSize?: string | number;
|
|
380
384
|
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, } from "./jumin";
|
|
17
|
+
export { REGION_MAP, extractJuminInfo, validateJuminChecksum, validateJuminBirthDate, isJuminValueInvalidState, } from "./jumin";
|
package/dist/utils/jumin.d.ts
CHANGED
|
@@ -25,3 +25,9 @@ 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;
|
|
@@ -0,0 +1,5 @@
|
|
|
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>;
|