@ehfuse/mui-form-controls 3.0.16 → 3.0.17
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/README.md +312 -312
- package/dist/Select.d.ts +7 -0
- package/dist/SwitchField.d.ts +10 -0
- package/dist/ToggleButtonGroupField.d.ts +10 -0
- package/dist/address.js.map +1 -1
- package/dist/index.d.ts +1 -2
- package/dist/index.js +1 -1
- package/dist/index.js.map +4 -4
- package/dist/index.mjs +1 -1
- package/dist/index.mjs.map +4 -4
- package/dist/types.d.ts +5 -22
- package/dist/useLongPressToggle.d.ts +15 -0
- package/package.json +90 -90
package/dist/types.d.ts
CHANGED
|
@@ -41,7 +41,12 @@ export type BaseTextFieldProps = {
|
|
|
41
41
|
form?: FormLike | null;
|
|
42
42
|
};
|
|
43
43
|
export type LongPressToggleProps = {
|
|
44
|
+
/**
|
|
45
|
+
* `true`이면 롱프레스 완료 시에만 `onChange`가 호출됩니다. 짧은 클릭으로는 MUI 기본 토글이 막힙니다.
|
|
46
|
+
* 동작을 쓰려면 `checked`를 넘겨 **제어 컴포넌트**로 사용해야 합니다.
|
|
47
|
+
*/
|
|
44
48
|
toggleOnLongPress?: boolean;
|
|
49
|
+
/** 롱프레스로 토글하기까지 대기 시간(ms). 기본 500. */
|
|
45
50
|
longPressDelay?: number;
|
|
46
51
|
};
|
|
47
52
|
export type TextAreaProps = BaseTextFieldProps & {
|
|
@@ -160,28 +165,6 @@ export type LabelSelectOption = {
|
|
|
160
165
|
/** 호버 시 브라우저 기본 툴팁(네이티브 `title`)로 표시할 안내 문구입니다. */
|
|
161
166
|
title?: string;
|
|
162
167
|
};
|
|
163
|
-
export type SelectOption = {
|
|
164
|
-
value: string | number | boolean;
|
|
165
|
-
label: React.ReactNode;
|
|
166
|
-
readonly?: boolean;
|
|
167
|
-
disabled?: boolean;
|
|
168
|
-
title?: string;
|
|
169
|
-
};
|
|
170
|
-
export type SelectProps = Omit<MuiSelectProps, "value" | "onChange" | "defaultValue" | "form"> & BaseTextFieldProps & {
|
|
171
|
-
label?: React.ReactNode;
|
|
172
|
-
value?: string | number | boolean;
|
|
173
|
-
onChange?: (event: SelectChangeEvent<string | number>) => void;
|
|
174
|
-
options: SelectOption[];
|
|
175
|
-
inputProps?: InputBaseComponentProps;
|
|
176
|
-
enableWheel?: boolean;
|
|
177
|
-
showLabel?: boolean;
|
|
178
|
-
emptyLabel?: React.ReactNode;
|
|
179
|
-
showEmptyOption?: boolean;
|
|
180
|
-
fullWidth?: boolean;
|
|
181
|
-
formControlProps?: Omit<FormControlProps, "children">;
|
|
182
|
-
name?: string;
|
|
183
|
-
suffix?: React.ReactNode;
|
|
184
|
-
};
|
|
185
168
|
export type LabelSelectProps = Omit<MuiSelectProps, "value" | "onChange" | "defaultValue" | "form"> & BaseTextFieldProps & {
|
|
186
169
|
label: string;
|
|
187
170
|
value?: string | number;
|
|
@@ -15,5 +15,20 @@ type UseLongPressToggleOptions = LongPressToggleHandlerProps & {
|
|
|
15
15
|
toggleOnLongPress?: boolean;
|
|
16
16
|
onChange?: ToggleChangeHandler;
|
|
17
17
|
};
|
|
18
|
+
/**
|
|
19
|
+
* `toggleOnLongPress`일 때 짧은 클릭으로 MUI 기본 `change`가 소비자 `onChange`까지 가지 않게 하려면
|
|
20
|
+
* 제어 컴포넌트(`checked !== undefined`)여야 합니다. 실제 토글은 롱프레스 완료 시 `triggerLongPressToggle`만 호출합니다.
|
|
21
|
+
*/
|
|
22
|
+
export declare function shouldSuppressMuiChangeForLongPress(options: {
|
|
23
|
+
toggleOnLongPress?: boolean;
|
|
24
|
+
onChange?: ToggleChangeHandler;
|
|
25
|
+
disabled?: boolean;
|
|
26
|
+
readonly?: boolean;
|
|
27
|
+
checked?: boolean;
|
|
28
|
+
}): boolean;
|
|
29
|
+
/** MUI Checkbox/Switch에 넘겨 짧은 클릭·기본 change 경로를 막습니다. */
|
|
30
|
+
export declare function suppressMuiToggleChangeEvent(event: React.ChangeEvent<HTMLInputElement>, ..._rest: unknown[]): void;
|
|
31
|
+
/** 포커스 시 Space / Enter 로 버튼·체크박스 기본 토글이 나가지 않게 막습니다. */
|
|
32
|
+
export declare function isToggleActivationKeyboardEvent(event: React.KeyboardEvent): boolean;
|
|
18
33
|
export declare function useLongPressToggle({ checked, disabled, name, longPressDelay, toggleOnLongPress, onChange, onClick, onPointerDown, onPointerUp, onPointerLeave, onPointerCancel, }: UseLongPressToggleOptions): LongPressToggleHandlerProps;
|
|
19
34
|
export {};
|
package/package.json
CHANGED
|
@@ -1,90 +1,90 @@
|
|
|
1
|
-
{
|
|
2
|
-
"name": "@ehfuse/mui-form-controls",
|
|
3
|
-
"version": "3.0.
|
|
4
|
-
"description": "Material-UI form controls and text fields for complex forms",
|
|
5
|
-
"private": false,
|
|
6
|
-
"publishConfig": {
|
|
7
|
-
"access": "public"
|
|
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
|
-
"./address": {
|
|
19
|
-
"types": "./dist/address.d.ts",
|
|
20
|
-
"import": "./dist/address.mjs",
|
|
21
|
-
"require": "./dist/address.js"
|
|
22
|
-
}
|
|
23
|
-
},
|
|
24
|
-
"files": [
|
|
25
|
-
"dist"
|
|
26
|
-
],
|
|
27
|
-
"scripts": {
|
|
28
|
-
"build": "node build.mjs",
|
|
29
|
-
"build:types": "tsc --emitDeclarationOnly",
|
|
30
|
-
"prepublishOnly": "npm run build"
|
|
31
|
-
},
|
|
32
|
-
"repository": {
|
|
33
|
-
"type": "git",
|
|
34
|
-
"url": "git+https://github.com/ehfuse/mui-form-controls.git"
|
|
35
|
-
},
|
|
36
|
-
"keywords": [
|
|
37
|
-
"react",
|
|
38
|
-
"mui",
|
|
39
|
-
"material-ui",
|
|
40
|
-
"form",
|
|
41
|
-
"controls",
|
|
42
|
-
"textfield",
|
|
43
|
-
"textarea",
|
|
44
|
-
"select",
|
|
45
|
-
"autocomplete",
|
|
46
|
-
"checkbox",
|
|
47
|
-
"switch",
|
|
48
|
-
"radio",
|
|
49
|
-
"slider",
|
|
50
|
-
"search",
|
|
51
|
-
"password",
|
|
52
|
-
"clear-button",
|
|
53
|
-
"input"
|
|
54
|
-
],
|
|
55
|
-
"author": "김영진 (Kim Young Jin) <ehfuse@gmail.com>",
|
|
56
|
-
"license": "MIT",
|
|
57
|
-
"bugs": {
|
|
58
|
-
"url": "https://github.com/ehfuse/mui-form-controls/issues"
|
|
59
|
-
},
|
|
60
|
-
"homepage": "https://github.com/ehfuse/mui-form-controls#readme",
|
|
61
|
-
"devDependencies": {
|
|
62
|
-
"@ehfuse/alerts": "^1.1.2",
|
|
63
|
-
"@ehfuse/overlay-scrollbar": "^1.6.9",
|
|
64
|
-
"@types/react": "^19.2.7",
|
|
65
|
-
"@types/react-daum-postcode": "^1.3.4",
|
|
66
|
-
"@types/react-dom": "^19.2.3",
|
|
67
|
-
"esbuild": "^0.27.0",
|
|
68
|
-
"react-daum-postcode": "^4.0.0",
|
|
69
|
-
"typescript": "^5.9.3"
|
|
70
|
-
},
|
|
71
|
-
"peerDependencies": {
|
|
72
|
-
"@base-ui/react": "^1.1.0",
|
|
73
|
-
"@ehfuse/alerts": ">=1.1.0",
|
|
74
|
-
"@ehfuse/forma": ">=3.1.0",
|
|
75
|
-
"@ehfuse/mui-datetime-picker": "^1.0.13",
|
|
76
|
-
"@ehfuse/overlay-scrollbar": ">=1.6.9",
|
|
77
|
-
"@emotion/react": "^11.0.0",
|
|
78
|
-
"@emotion/styled": "^11.0.0",
|
|
79
|
-
"@mui/icons-material": "^5.0.0 || ^6.0.0 || ^7.0.0",
|
|
80
|
-
"@mui/material": "^5.0.0 || ^6.0.0 || ^7.0.0",
|
|
81
|
-
"react": "^18.0.0 || ^19.0.0",
|
|
82
|
-
"react-daum-postcode": "^3.0.0 || ^4.0.0",
|
|
83
|
-
"react-dom": "^18.0.0 || ^19.0.0"
|
|
84
|
-
},
|
|
85
|
-
"peerDependenciesMeta": {
|
|
86
|
-
"react-daum-postcode": {
|
|
87
|
-
"optional": true
|
|
88
|
-
}
|
|
89
|
-
}
|
|
90
|
-
}
|
|
1
|
+
{
|
|
2
|
+
"name": "@ehfuse/mui-form-controls",
|
|
3
|
+
"version": "3.0.17",
|
|
4
|
+
"description": "Material-UI form controls and text fields for complex forms",
|
|
5
|
+
"private": false,
|
|
6
|
+
"publishConfig": {
|
|
7
|
+
"access": "public"
|
|
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
|
+
"./address": {
|
|
19
|
+
"types": "./dist/address.d.ts",
|
|
20
|
+
"import": "./dist/address.mjs",
|
|
21
|
+
"require": "./dist/address.js"
|
|
22
|
+
}
|
|
23
|
+
},
|
|
24
|
+
"files": [
|
|
25
|
+
"dist"
|
|
26
|
+
],
|
|
27
|
+
"scripts": {
|
|
28
|
+
"build": "node build.mjs",
|
|
29
|
+
"build:types": "tsc --emitDeclarationOnly",
|
|
30
|
+
"prepublishOnly": "npm run build"
|
|
31
|
+
},
|
|
32
|
+
"repository": {
|
|
33
|
+
"type": "git",
|
|
34
|
+
"url": "git+https://github.com/ehfuse/mui-form-controls.git"
|
|
35
|
+
},
|
|
36
|
+
"keywords": [
|
|
37
|
+
"react",
|
|
38
|
+
"mui",
|
|
39
|
+
"material-ui",
|
|
40
|
+
"form",
|
|
41
|
+
"controls",
|
|
42
|
+
"textfield",
|
|
43
|
+
"textarea",
|
|
44
|
+
"select",
|
|
45
|
+
"autocomplete",
|
|
46
|
+
"checkbox",
|
|
47
|
+
"switch",
|
|
48
|
+
"radio",
|
|
49
|
+
"slider",
|
|
50
|
+
"search",
|
|
51
|
+
"password",
|
|
52
|
+
"clear-button",
|
|
53
|
+
"input"
|
|
54
|
+
],
|
|
55
|
+
"author": "김영진 (Kim Young Jin) <ehfuse@gmail.com>",
|
|
56
|
+
"license": "MIT",
|
|
57
|
+
"bugs": {
|
|
58
|
+
"url": "https://github.com/ehfuse/mui-form-controls/issues"
|
|
59
|
+
},
|
|
60
|
+
"homepage": "https://github.com/ehfuse/mui-form-controls#readme",
|
|
61
|
+
"devDependencies": {
|
|
62
|
+
"@ehfuse/alerts": "^1.1.2",
|
|
63
|
+
"@ehfuse/overlay-scrollbar": "^1.6.9",
|
|
64
|
+
"@types/react": "^19.2.7",
|
|
65
|
+
"@types/react-daum-postcode": "^1.3.4",
|
|
66
|
+
"@types/react-dom": "^19.2.3",
|
|
67
|
+
"esbuild": "^0.27.0",
|
|
68
|
+
"react-daum-postcode": "^4.0.0",
|
|
69
|
+
"typescript": "^5.9.3"
|
|
70
|
+
},
|
|
71
|
+
"peerDependencies": {
|
|
72
|
+
"@base-ui/react": "^1.1.0",
|
|
73
|
+
"@ehfuse/alerts": ">=1.1.0",
|
|
74
|
+
"@ehfuse/forma": ">=3.1.0",
|
|
75
|
+
"@ehfuse/mui-datetime-picker": "^1.0.13",
|
|
76
|
+
"@ehfuse/overlay-scrollbar": ">=1.6.9",
|
|
77
|
+
"@emotion/react": "^11.0.0",
|
|
78
|
+
"@emotion/styled": "^11.0.0",
|
|
79
|
+
"@mui/icons-material": "^5.0.0 || ^6.0.0 || ^7.0.0",
|
|
80
|
+
"@mui/material": "^5.0.0 || ^6.0.0 || ^7.0.0",
|
|
81
|
+
"react": "^18.0.0 || ^19.0.0",
|
|
82
|
+
"react-daum-postcode": "^3.0.0 || ^4.0.0",
|
|
83
|
+
"react-dom": "^18.0.0 || ^19.0.0"
|
|
84
|
+
},
|
|
85
|
+
"peerDependenciesMeta": {
|
|
86
|
+
"react-daum-postcode": {
|
|
87
|
+
"optional": true
|
|
88
|
+
}
|
|
89
|
+
}
|
|
90
|
+
}
|