@ehfuse/mui-form-controls 3.0.58 → 3.0.59
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/SwitchField.d.ts +10 -0
- package/dist/ToggleButtonGroupField.d.ts +10 -0
- package/dist/address.js.map +1 -1
- package/dist/address.mjs.map +1 -1
- package/dist/devDebug.d.ts +35 -0
- package/dist/index.d.ts +1 -1
- package/dist/index.js +1 -1
- package/dist/index.js.map +3 -3
- package/dist/index.mjs +1 -1
- package/dist/index.mjs.map +3 -3
- package/dist/types.d.ts +8 -1
- package/dist/utils/index.d.ts +1 -1
- package/dist/utils/jumin.d.ts +18 -1
- package/dist/utils/outlinedFieldStyles.d.ts +5 -0
- package/package.json +1 -1
package/dist/types.d.ts
CHANGED
|
@@ -374,11 +374,16 @@ export type JuminInfo = {
|
|
|
374
374
|
* 주민등록번호 텍스트 필드 타입
|
|
375
375
|
*
|
|
376
376
|
* **오류 표시(테두리·라벨)**: MUI `error`(TextField)와 emitChange와 동일한 내부 유효성(생일·13자·체크섬)을
|
|
377
|
-
* `finalError = Boolean(error) || (내부 실패)`로 병합한다.
|
|
377
|
+
* `finalError = Boolean(error) || (내부 실패)`로 병합한다. 내부 실패로 빨간 테두리는 마스킹 7자리·비마스킹 13자리가
|
|
378
|
+
* 모두 채워진 뒤에만 적용된다(입력 중에는 표시하지 않음). `error === true`이면 내부가 유효해도 항상 오류 스타일.
|
|
378
379
|
*
|
|
379
380
|
* `invalidBorderColor`(`ValidatableTextFieldProps`)는 `finalError`일 때
|
|
380
381
|
* notched outline·`InputLabel`에 적용(미지정 시 `theme.palette.error`). `helperText` 색은 MUI 기본.
|
|
381
382
|
*
|
|
383
|
+
* `showInvalidTooltip`이 `true`이면 `finalError`일 때 MUI `Tooltip`으로 안내 문구를 연다(오류가 해소되면 닫힌다).
|
|
384
|
+
* 툴팁은 `placement="top"`·`arrow`로 입력 영역(앵커)을 가리키는 화살표를 표시한다. 문구는 패키지 고정 한국어 문구를 쓴다.
|
|
385
|
+
*
|
|
386
|
+
* @see isJuminValueValid
|
|
382
387
|
* @see isJuminValueInvalidState
|
|
383
388
|
*/
|
|
384
389
|
export type JuminTextFieldProps = Omit<TextFieldProps, "type" | "onChange" | "value"> & BaseTextFieldProps & ValidatableTextFieldProps & {
|
|
@@ -391,6 +396,8 @@ export type JuminTextFieldProps = Omit<TextFieldProps, "type" | "onChange" | "va
|
|
|
391
396
|
fontColor?: string;
|
|
392
397
|
fontFamily?: string;
|
|
393
398
|
onChange?: (info: JuminInfo) => void;
|
|
399
|
+
/** `true`이면 유효하지 않을 때(`finalError`) 툴팁 표시를 허용한다. 기본 `false`. */
|
|
400
|
+
showInvalidTooltip?: boolean;
|
|
394
401
|
};
|
|
395
402
|
/**
|
|
396
403
|
* 커스텀 도메인 정의 (아이콘 포함)
|
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, isJuminValueInvalidState, } from "./jumin";
|
|
17
|
+
export { REGION_MAP, extractJuminInfo, validateJuminChecksum, validateJuminBirthDate, isJuminValueValid, isJuminValueInvalidState, sanitizeJuminFrontBirthDigits, canAppendJuminBirthDigit, maxDayForJuminFrontYyMm, } from "./jumin";
|
package/dist/utils/jumin.d.ts
CHANGED
|
@@ -25,9 +25,26 @@ export declare function validateJuminChecksum(numbers: string): boolean;
|
|
|
25
25
|
* 주민등록번호 생년월일 유효성 검증
|
|
26
26
|
*/
|
|
27
27
|
export declare function validateJuminBirthDate(numbers: string): boolean;
|
|
28
|
+
/**
|
|
29
|
+
* 앞 6자리(YYMMDD)만 있을 때, 성별코드가 없어 세기를 모르므로 19xx·20xx 중
|
|
30
|
+
* 해당 월의 일수가 더 큰 값을 사용한다(윤년·평년 모두 반영).
|
|
31
|
+
*/
|
|
32
|
+
export declare function maxDayForJuminFrontYyMm(yy: string, mmStr: string): number;
|
|
33
|
+
/** YYMMDD 앞부분(prefix 0~5자리)에 한 자리를 붙일 수 있는지 */
|
|
34
|
+
export declare function canAppendJuminBirthDigit(prefix: string, digit: string): boolean;
|
|
35
|
+
/**
|
|
36
|
+
* 주민번호 앞 6자리(YYMMDD)에서 월(01~12)·일(해당 월 최대 일수) 규칙을 만족하는
|
|
37
|
+
* 최대 접두만 남긴다. 붙여넣기·입력 필터에 사용한다.
|
|
38
|
+
*/
|
|
39
|
+
export declare function sanitizeJuminFrontBirthDigits(value: string): string;
|
|
40
|
+
/**
|
|
41
|
+
* 마스킹 7자리·비마스킹 13자리가 모두 채워졌을 때 전체 값이 유효한지.
|
|
42
|
+
* (`JuminTextField`의 `emitChange`·`onValidationChange`와 동일 규칙)
|
|
43
|
+
*/
|
|
44
|
+
export declare function isJuminValueValid(fullValue: string, mask: boolean, validateChecksum: boolean): boolean;
|
|
28
45
|
/**
|
|
29
46
|
* JuminTextField(emitChange)와 동일한 규칙으로, 현재 앞/뒤 숫자를 이었을 때
|
|
30
47
|
* 오류 UI(빨간 테두리)에 해당하는지. 값이 없으면 `false` (빨간 테두리 없음).
|
|
31
|
-
*
|
|
48
|
+
* 마스킹 7자리·비마스킹 13자리가 모두 채워진 뒤에만 내부 유효성 실패 시 `true`이다.
|
|
32
49
|
*/
|
|
33
50
|
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>;
|