@ehfuse/mui-form-controls 3.0.57 → 3.0.58

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
@@ -250,6 +250,7 @@ export type { SelectChangeEvent };
250
250
  */
251
251
  export type ValidatableTextFieldProps = {
252
252
  onValidationChange?: (isValid: boolean) => void;
253
+ /** 컴포넌트에 따라 유효성 실패 시 notched outline·라벨 등에 적용(미지정 시 theme error). */
253
254
  invalidBorderColor?: string;
254
255
  };
255
256
  export type SearchTextFieldProps = TextFieldProps & BaseTextFieldProps & {
@@ -371,11 +372,20 @@ export type JuminInfo = {
371
372
  };
372
373
  /**
373
374
  * 주민등록번호 텍스트 필드 타입
375
+ *
376
+ * **오류 표시(테두리·라벨)**: MUI `error`(TextField)와 emitChange와 동일한 내부 유효성(생일·13자·체크섬)을
377
+ * `finalError = Boolean(error) || (내부 실패)`로 병합한다. `error === true`이면 내부가 유효해도 항상 오류 스타일.
378
+ *
379
+ * `invalidBorderColor`(`ValidatableTextFieldProps`)는 `finalError`일 때
380
+ * notched outline·`InputLabel`에 적용(미지정 시 `theme.palette.error`). `helperText` 색은 MUI 기본.
381
+ *
382
+ * @see isJuminValueInvalidState
374
383
  */
375
384
  export type JuminTextFieldProps = Omit<TextFieldProps, "type" | "onChange" | "value"> & BaseTextFieldProps & ValidatableTextFieldProps & {
376
385
  value?: string;
377
386
  mask?: boolean;
378
387
  maskColor?: string;
388
+ /** `false`이면 13자리에서 체크섬 검사 생략(비마스킹만). */
379
389
  validateChecksum?: boolean;
380
390
  fontSize?: string | number;
381
391
  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, } from "./jumin";
17
+ export { REGION_MAP, extractJuminInfo, validateJuminChecksum, validateJuminBirthDate, isJuminValueInvalidState, } from "./jumin";
@@ -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;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ehfuse/mui-form-controls",
3
- "version": "3.0.57",
3
+ "version": "3.0.58",
4
4
  "description": "Material-UI form controls and text fields for complex forms",
5
5
  "private": false,
6
6
  "publishConfig": {