@ehfuse/mui-form-controls 1.0.0
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 -0
- package/README.md +169 -0
- package/dist/AddressTextField.d.ts +10 -0
- package/dist/Autocomplete.d.ts +10 -0
- package/dist/BizNumTextField.d.ts +10 -0
- package/dist/CardNumTextField.d.ts +11 -0
- package/dist/Checkbox.d.ts +10 -0
- package/dist/ClearTextField.d.ts +22 -0
- package/dist/DateRange.d.ts +9 -0
- package/dist/DateTextField.d.ts +11 -0
- package/dist/DateTimeTextField.d.ts +11 -0
- package/dist/EmailTextField.d.ts +10 -0
- package/dist/JuminTextField.d.ts +10 -0
- package/dist/LabelSelect.d.ts +10 -0
- package/dist/NumberTextField.d.ts +11 -0
- package/dist/PasswordTextField.d.ts +10 -0
- package/dist/PhoneTextField.d.ts +11 -0
- package/dist/RadioGroup.d.ts +10 -0
- package/dist/SearchTextField.d.ts +33 -0
- package/dist/Select.d.ts +10 -0
- package/dist/Slider.d.ts +10 -0
- package/dist/Switch.d.ts +10 -0
- package/dist/TextArea.d.ts +24 -0
- package/dist/TextAreaTextField.d.ts +24 -0
- package/dist/TimeTextField.d.ts +11 -0
- package/dist/VerificationCodeTextField.d.ts +10 -0
- package/dist/components/ColonBox.d.ts +23 -0
- package/dist/components/GroupedInputWrapper.d.ts +36 -0
- package/dist/components/SimpleCalendar.d.ts +45 -0
- package/dist/components/TimePicker.d.ts +26 -0
- package/dist/components/TimeSelector.d.ts +24 -0
- package/dist/components/index.d.ts +4 -0
- package/dist/hooks/index.d.ts +12 -0
- package/dist/hooks/useGroupedInput.d.ts +48 -0
- package/dist/hooks/useKoreanHolidays.d.ts +29 -0
- package/dist/hooks/useTextFieldBase.d.ts +47 -0
- package/dist/icons/CalendarIcon.d.ts +10 -0
- package/dist/icons/ChevronLeft.d.ts +8 -0
- package/dist/icons/ChevronRight.d.ts +8 -0
- package/dist/icons/ClockIcon.d.ts +13 -0
- package/dist/icons/ColonIcon.d.ts +13 -0
- package/dist/icons/CopyIcon.d.ts +12 -0
- package/dist/icons/DashIcon.d.ts +12 -0
- package/dist/icons/card-icons.d.ts +21 -0
- package/dist/icons/email-icons.d.ts +27 -0
- package/dist/icons/index.d.ts +8 -0
- package/dist/index.d.ts +33 -0
- package/dist/index.js +443 -0
- package/dist/index.js.map +7 -0
- package/dist/index.mjs +443 -0
- package/dist/index.mjs.map +7 -0
- package/dist/label-select/LabelSelect.d.ts +9 -0
- package/dist/label-select/index.d.ts +9 -0
- package/dist/label-select/types.d.ts +38 -0
- package/dist/types.d.ts +406 -0
- package/dist/utils/biznum.d.ts +12 -0
- package/dist/utils/card.d.ts +17 -0
- package/dist/utils/date.d.ts +114 -0
- package/dist/utils/datetime.d.ts +37 -0
- package/dist/utils/email.d.ts +15 -0
- package/dist/utils/index.d.ts +17 -0
- package/dist/utils/jumin.d.ts +27 -0
- package/dist/utils/number.d.ts +15 -0
- package/dist/utils/password.d.ts +17 -0
- package/dist/utils/phone.d.ts +17 -0
- package/dist/utils/time.d.ts +27 -0
- package/package.json +78 -0
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* jumin.ts - 주민등록번호 관련 유틸리티 함수
|
|
3
|
+
*
|
|
4
|
+
* @license MIT
|
|
5
|
+
* @copyright 2025 김영진 (Kim Young Jin)
|
|
6
|
+
* @author 김영진 (ehfuse@gmail.com)
|
|
7
|
+
*/
|
|
8
|
+
import type { JuminInfo } from "../types";
|
|
9
|
+
/**
|
|
10
|
+
* 주민번호 뒷자리 2~3번째 숫자로 지역 추출
|
|
11
|
+
* (2020년 10월 이후 출생자는 랜덤 부여로 의미 없음)
|
|
12
|
+
*/
|
|
13
|
+
export declare const REGION_MAP: Record<string, string>;
|
|
14
|
+
/**
|
|
15
|
+
* 주민번호에서 정보 추출
|
|
16
|
+
*/
|
|
17
|
+
export declare function extractJuminInfo(value: string): Omit<JuminInfo, "isValid">;
|
|
18
|
+
/**
|
|
19
|
+
* 주민등록번호 체크섬 검증
|
|
20
|
+
* - 13자리 각 숫자에 가중치 [2,3,4,5,6,7,8,9,2,3,4,5]를 곱하여 합산
|
|
21
|
+
* - (11 - (합계 % 11)) % 10 === 마지막 자리
|
|
22
|
+
*/
|
|
23
|
+
export declare function validateJuminChecksum(numbers: string): boolean;
|
|
24
|
+
/**
|
|
25
|
+
* 주민등록번호 생년월일 유효성 검증
|
|
26
|
+
*/
|
|
27
|
+
export declare function validateJuminBirthDate(numbers: string): boolean;
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* number.ts - 숫자 포맷팅 유틸리티 함수
|
|
3
|
+
*
|
|
4
|
+
* @license MIT
|
|
5
|
+
* @copyright 2025 김영진 (Kim Young Jin)
|
|
6
|
+
* @author 김영진 (ehfuse@gmail.com)
|
|
7
|
+
*/
|
|
8
|
+
/**
|
|
9
|
+
* 숫자 포맷팅 함수
|
|
10
|
+
*/
|
|
11
|
+
export declare function formatNumber(value: string, thousandSeparator: boolean, decimalLength?: number): string;
|
|
12
|
+
/**
|
|
13
|
+
* 표시 값에서 실제 숫자 값 추출
|
|
14
|
+
*/
|
|
15
|
+
export declare function parseNumber(displayValue: string): string;
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* password.ts - 비밀번호 관련 유틸리티 함수
|
|
3
|
+
*
|
|
4
|
+
* @license MIT
|
|
5
|
+
* @copyright 2025 김영진 (Kim Young Jin)
|
|
6
|
+
* @author 김영진 (ehfuse@gmail.com)
|
|
7
|
+
*/
|
|
8
|
+
import type { PasswordValidationRules, PasswordValidationResult } from "../types";
|
|
9
|
+
export declare const DEFAULT_SPECIAL_CHARS = "!@#$%^&*()_+-=[]{}|;:,.<>?";
|
|
10
|
+
/**
|
|
11
|
+
* 기본 유효성 검사 규칙
|
|
12
|
+
*/
|
|
13
|
+
export declare const DEFAULT_PASSWORD_VALIDATION_RULES: PasswordValidationRules;
|
|
14
|
+
/**
|
|
15
|
+
* 비밀번호 유효성 검사 함수
|
|
16
|
+
*/
|
|
17
|
+
export declare function validatePassword(value: string, rules: PasswordValidationRules): PasswordValidationResult;
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* phone.ts - 전화번호 관련 유틸리티 함수
|
|
3
|
+
*
|
|
4
|
+
* @license MIT
|
|
5
|
+
* @copyright 2025 김영진 (Kim Young Jin)
|
|
6
|
+
* @author 김영진 (ehfuse@gmail.com)
|
|
7
|
+
*/
|
|
8
|
+
import type { PhoneFormat } from "../types";
|
|
9
|
+
/**
|
|
10
|
+
* 전화번호 자동 포맷팅 함수
|
|
11
|
+
* 입력된 번호를 보고 자동으로 포맷 판단
|
|
12
|
+
*/
|
|
13
|
+
export declare function formatPhoneNumber(value: string, customFormat?: PhoneFormat): string;
|
|
14
|
+
/**
|
|
15
|
+
* 입력된 번호에 따른 최대 길이 계산
|
|
16
|
+
*/
|
|
17
|
+
export declare function getPhoneMaxLength(numbers: string): number;
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* time.ts - 시간 관련 유틸리티 함수
|
|
3
|
+
*
|
|
4
|
+
* @license MIT
|
|
5
|
+
* @copyright 2025 김영진 (Kim Young Jin)
|
|
6
|
+
* @author 김영진 (ehfuse@gmail.com)
|
|
7
|
+
*/
|
|
8
|
+
import type { TimeFormat } from "../types";
|
|
9
|
+
/**
|
|
10
|
+
* 포맷에 따른 필드 개수 (2: 시:분, 3: 시:분:초)
|
|
11
|
+
*/
|
|
12
|
+
export declare function getTimeFieldCount(format: TimeFormat): number;
|
|
13
|
+
/**
|
|
14
|
+
* 12시간 형식인지 확인
|
|
15
|
+
*/
|
|
16
|
+
export declare function is12HourFormat(format: string): boolean;
|
|
17
|
+
/**
|
|
18
|
+
* 시간 유효성 검사
|
|
19
|
+
* @param formatOrIs12Hour - TimeFormat 문자열 또는 12시간제 여부 boolean
|
|
20
|
+
*/
|
|
21
|
+
export declare function validateTime(hour: string, minute: string, second: string, formatOrIs12Hour: TimeFormat | boolean, minTime?: string, maxTime?: string): boolean;
|
|
22
|
+
/**
|
|
23
|
+
* 시간 값 제한 (시/분/초)
|
|
24
|
+
* - 24시간 형식에서 24 이상을 입력하면 24를 빼서 변환 (24→00, 25→01, 26→02, ...)
|
|
25
|
+
* - 첫 자리가 범위 초과 시 앞에 0을 붙여서 두 자리로 변환
|
|
26
|
+
*/
|
|
27
|
+
export declare function clampTimeValue(value: string, type: "hour" | "minute" | "second", is12Hour?: boolean): string;
|
package/package.json
ADDED
|
@@ -0,0 +1,78 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@ehfuse/mui-form-controls",
|
|
3
|
+
"version": "1.0.0",
|
|
4
|
+
"description": "Material-UI form controls and text fields for complex forms",
|
|
5
|
+
"private": false,
|
|
6
|
+
"publishConfig": {
|
|
7
|
+
"access": "restricted"
|
|
8
|
+
},
|
|
9
|
+
"main": "dist/index.js",
|
|
10
|
+
"module": "dist/index.mjs",
|
|
11
|
+
"types": "dist/index.d.ts",
|
|
12
|
+
"exports": {
|
|
13
|
+
".": {
|
|
14
|
+
"types": "./dist/index.d.ts",
|
|
15
|
+
"import": "./dist/index.mjs",
|
|
16
|
+
"require": "./dist/index.js"
|
|
17
|
+
}
|
|
18
|
+
},
|
|
19
|
+
"files": [
|
|
20
|
+
"dist"
|
|
21
|
+
],
|
|
22
|
+
"scripts": {
|
|
23
|
+
"build": "node build.mjs",
|
|
24
|
+
"build:types": "tsc --emitDeclarationOnly",
|
|
25
|
+
"prepublishOnly": "npm run build"
|
|
26
|
+
},
|
|
27
|
+
"repository": {
|
|
28
|
+
"type": "git",
|
|
29
|
+
"url": "git+https://github.com/ehfuse/mui-form-controls.git"
|
|
30
|
+
},
|
|
31
|
+
"keywords": [
|
|
32
|
+
"react",
|
|
33
|
+
"mui",
|
|
34
|
+
"material-ui",
|
|
35
|
+
"form",
|
|
36
|
+
"controls",
|
|
37
|
+
"textfield",
|
|
38
|
+
"textarea",
|
|
39
|
+
"select",
|
|
40
|
+
"autocomplete",
|
|
41
|
+
"checkbox",
|
|
42
|
+
"switch",
|
|
43
|
+
"radio",
|
|
44
|
+
"slider",
|
|
45
|
+
"search",
|
|
46
|
+
"password",
|
|
47
|
+
"clear-button",
|
|
48
|
+
"input"
|
|
49
|
+
],
|
|
50
|
+
"author": "김영진 (Kim Young Jin) <ehfuse@gmail.com>",
|
|
51
|
+
"license": "MIT",
|
|
52
|
+
"bugs": {
|
|
53
|
+
"url": "https://github.com/ehfuse/mui-form-controls/issues"
|
|
54
|
+
},
|
|
55
|
+
"homepage": "https://github.com/ehfuse/mui-form-controls#readme",
|
|
56
|
+
"devDependencies": {
|
|
57
|
+
"@ehfuse/alerts": "^1.0.0",
|
|
58
|
+
"@ehfuse/overlay-scrollbar": "^1.5.12",
|
|
59
|
+
"@types/react": "^19.2.7",
|
|
60
|
+
"@types/react-daum-postcode": "^1.3.4",
|
|
61
|
+
"@types/react-dom": "^19.2.3",
|
|
62
|
+
"esbuild": "^0.27.0",
|
|
63
|
+
"typescript": "^5.9.3"
|
|
64
|
+
},
|
|
65
|
+
"peerDependencies": {
|
|
66
|
+
"@ehfuse/alerts": "^1.0.0",
|
|
67
|
+
"@ehfuse/forma": "^3.1.0",
|
|
68
|
+
"@ehfuse/mui-datetime-picker": "^1.0.8",
|
|
69
|
+
"@ehfuse/overlay-scrollbar": "^1.5.0",
|
|
70
|
+
"@emotion/react": "^11.0.0",
|
|
71
|
+
"@emotion/styled": "^11.0.0",
|
|
72
|
+
"@mui/icons-material": "^5.0.0 || ^6.0.0 || ^7.0.0",
|
|
73
|
+
"@mui/material": "^5.0.0 || ^6.0.0 || ^7.0.0",
|
|
74
|
+
"react": "^18.0.0 || ^19.0.0",
|
|
75
|
+
"react-daum-postcode": "^3.0.0",
|
|
76
|
+
"react-dom": "^18.0.0 || ^19.0.0"
|
|
77
|
+
}
|
|
78
|
+
}
|