@ehfuse/mui-form-controls 3.0.52 → 3.0.53

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
@@ -244,6 +244,7 @@ export type { SelectChangeEvent };
244
244
  */
245
245
  export type ValidatableTextFieldProps = {
246
246
  onValidationChange?: (isValid: boolean) => void;
247
+ /** 컴포넌트에 따라 유효성 실패 시 notched outline·라벨 등에 적용(미지정 시 theme error). */
247
248
  invalidBorderColor?: string;
248
249
  };
249
250
  export type SearchTextFieldProps = TextFieldProps & BaseTextFieldProps & {
@@ -364,11 +365,20 @@ export type JuminInfo = {
364
365
  };
365
366
  /**
366
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
367
376
  */
368
377
  export type JuminTextFieldProps = Omit<TextFieldProps, "type" | "onChange" | "value"> & BaseTextFieldProps & ValidatableTextFieldProps & {
369
378
  value?: string;
370
379
  mask?: boolean;
371
380
  maskColor?: string;
381
+ /** `false`이면 13자리에서 체크섬 검사 생략(비마스킹만). */
372
382
  validateChecksum?: boolean;
373
383
  fontSize?: string | number;
374
384
  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;
@@ -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>;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ehfuse/mui-form-controls",
3
- "version": "3.0.52",
3
+ "version": "3.0.53",
4
4
  "description": "Material-UI form controls and text fields for complex forms",
5
5
  "private": false,
6
6
  "publishConfig": {