@ehfuse/mui-form-controls 1.3.18 → 1.3.20

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
@@ -19,6 +19,7 @@ import type { StepperProps as MuiStepperProps } from "@mui/material/Stepper";
19
19
  import type { AutocompleteProps as MuiAutocompleteProps } from "@mui/material/Autocomplete";
20
20
  import type { SelectProps as MuiSelectProps, SelectChangeEvent } from "@mui/material/Select";
21
21
  import type { FormControlProps } from "@mui/material/FormControl";
22
+ import type { FormControlLabelProps } from "@mui/material/FormControlLabel";
22
23
  import type { InputBaseComponentProps } from "@mui/material/InputBase";
23
24
  export type TextFieldProps = MuiTextFieldProps;
24
25
  export type ButtonGroupProps = MuiButtonGroupProps;
@@ -66,6 +67,11 @@ export type SwitchProps = Omit<MuiSwitchProps, "checked" | "onChange" | "form">
66
67
  label?: React.ReactNode;
67
68
  onChange?: (event: React.ChangeEvent<HTMLInputElement>, checked: boolean) => void;
68
69
  };
70
+ export type SwitchFieldProps = Omit<SwitchProps, "label"> & {
71
+ label: React.ReactNode;
72
+ labelPlacement?: FormControlLabelProps["labelPlacement"];
73
+ sx?: SxProps<Theme>;
74
+ };
69
75
  export type RadioOption = {
70
76
  value: string;
71
77
  label: React.ReactNode;
package/package.json CHANGED
@@ -1,85 +1,85 @@
1
- {
2
- "name": "@ehfuse/mui-form-controls",
3
- "version": "1.3.18",
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
- },
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.1.2",
58
- "@ehfuse/overlay-scrollbar": "^1.6.9",
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
- "react-daum-postcode": "^4.0.0",
64
- "typescript": "^5.9.3"
65
- },
66
- "peerDependencies": {
67
- "@base-ui/react": "^1.1.0",
68
- "@ehfuse/alerts": ">=1.1.0",
69
- "@ehfuse/forma": ">=3.1.0",
70
- "@ehfuse/mui-datetime-picker": ">=1.0.8",
71
- "@ehfuse/overlay-scrollbar": ">=1.6.9",
72
- "@emotion/react": "^11.0.0",
73
- "@emotion/styled": "^11.0.0",
74
- "@mui/icons-material": "^5.0.0 || ^6.0.0 || ^7.0.0",
75
- "@mui/material": "^5.0.0 || ^6.0.0 || ^7.0.0",
76
- "react": "^18.0.0 || ^19.0.0",
77
- "react-daum-postcode": "^3.0.0 || ^4.0.0",
78
- "react-dom": "^18.0.0 || ^19.0.0"
79
- },
80
- "peerDependenciesMeta": {
81
- "react-daum-postcode": {
82
- "optional": true
83
- }
84
- }
85
- }
1
+ {
2
+ "name": "@ehfuse/mui-form-controls",
3
+ "version": "1.3.20",
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
+ },
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.1.2",
58
+ "@ehfuse/overlay-scrollbar": "^1.6.9",
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
+ "react-daum-postcode": "^4.0.0",
64
+ "typescript": "^5.9.3"
65
+ },
66
+ "peerDependencies": {
67
+ "@base-ui/react": "^1.1.0",
68
+ "@ehfuse/alerts": ">=1.1.0",
69
+ "@ehfuse/forma": ">=3.1.0",
70
+ "@ehfuse/mui-datetime-picker": "^1.0.13",
71
+ "@ehfuse/overlay-scrollbar": ">=1.6.9",
72
+ "@emotion/react": "^11.0.0",
73
+ "@emotion/styled": "^11.0.0",
74
+ "@mui/icons-material": "^5.0.0 || ^6.0.0 || ^7.0.0",
75
+ "@mui/material": "^5.0.0 || ^6.0.0 || ^7.0.0",
76
+ "react": "^18.0.0 || ^19.0.0",
77
+ "react-daum-postcode": "^3.0.0 || ^4.0.0",
78
+ "react-dom": "^18.0.0 || ^19.0.0"
79
+ },
80
+ "peerDependenciesMeta": {
81
+ "react-daum-postcode": {
82
+ "optional": true
83
+ }
84
+ }
85
+ }
@@ -1,24 +0,0 @@
1
- /**
2
- * TextArea.tsx
3
- *
4
- * @license MIT
5
- * @copyright 2025 김영진 (Kim Young Jin)
6
- * @author 김영진 (ehfuse@gmail.com)
7
- */
8
- import React from "react";
9
- export declare const TextArea: React.ForwardRefExoticComponent<import("./types").BaseTextFieldProps & {
10
- label?: string;
11
- value?: string;
12
- name?: string;
13
- onChange?: (e: React.ChangeEvent<HTMLTextAreaElement>) => void;
14
- onBlur?: (e: React.FocusEvent<HTMLTextAreaElement>) => void;
15
- onFocus?: (e: React.FocusEvent<HTMLTextAreaElement>) => void;
16
- minRows?: number;
17
- maxRows?: number;
18
- placeholder?: string;
19
- disabled?: boolean;
20
- fullWidth?: boolean;
21
- sx?: import("@mui/material").SxProps<import("@mui/material").Theme>;
22
- inputProps?: React.TextareaHTMLAttributes<HTMLTextAreaElement>;
23
- inputRef?: React.Ref<HTMLTextAreaElement>;
24
- } & React.RefAttributes<HTMLTextAreaElement>>;
@@ -1,45 +0,0 @@
1
- /**
2
- * SimpleCalendar.tsx
3
- *
4
- * @license MIT
5
- * @copyright 2025 김영진 (Kim Young Jin)
6
- * @author 김영진 (ehfuse@gmail.com)
7
- */
8
- export type SimpleCalendarProps = {
9
- selectedDate: Date | null;
10
- onSelect: (date: Date) => void;
11
- minDate?: Date;
12
- maxDate?: Date;
13
- holidays?: Date[];
14
- selectedColor?: string;
15
- onClose: () => void;
16
- showToday?: boolean;
17
- showTimePicker?: boolean;
18
- timeValue?: {
19
- hour: string;
20
- minute: string;
21
- second?: string;
22
- };
23
- onTimeChange?: (hour: number, minute: number, second?: number) => void;
24
- timeFormat?: "HH:mm" | "HH:mm:ss" | "hh:mm" | "hh:mm:ss";
25
- minTime?: string;
26
- maxTime?: string;
27
- minuteStep?: number;
28
- secondStep?: number;
29
- hideDisabledTime?: boolean;
30
- };
31
- /**
32
- * 간단한 MUI 스타일 달력 컴포넌트
33
- *
34
- * 구조:
35
- * calendar-root (flex column, 100% height)
36
- * ├── calendar-header (공통, 고정 높이 40px)
37
- * │ - viewMode에 따라 내용 변경
38
- * ├── calendar-content (flex: 1)
39
- * │ - [calendar] 요일 헤더 + 날짜 그리드
40
- * │ - [year] 연도 그리드 (OverlayScrollbar)
41
- * │ - [month] 월 그리드
42
- * └── calendar-footer (공통, 고정 높이 40px)
43
- * - viewMode에 따라 버튼 변경
44
- */
45
- export declare function SimpleCalendar({ selectedDate, onSelect, minDate, maxDate, holidays, selectedColor, onClose, showToday, showTimePicker, timeValue, onTimeChange, timeFormat, minTime, maxTime, minuteStep, secondStep, hideDisabledTime, }: SimpleCalendarProps): import("react/jsx-runtime").JSX.Element;
@@ -1,26 +0,0 @@
1
- /**
2
- * TimePicker.tsx
3
- *
4
- * @license MIT
5
- * @copyright 2025 김영진 (Kim Young Jin)
6
- * @author 김영진 (ehfuse@gmail.com)
7
- */
8
- interface TimePickerProps {
9
- anchorEl: HTMLElement | null;
10
- open: boolean;
11
- onClose: () => void;
12
- value: {
13
- hour: string;
14
- minute: string;
15
- second?: string;
16
- };
17
- onChange: (hour: string, minute: string, second?: string) => void;
18
- format: "HH:mm" | "HH:mm:ss" | "hh:mm" | "hh:mm:ss";
19
- minTime?: string;
20
- maxTime?: string;
21
- minuteStep?: number;
22
- secondStep?: number;
23
- hideDisabledTime?: boolean;
24
- }
25
- export declare function TimePicker({ anchorEl, open, onClose, value, onChange, format, minTime, maxTime, minuteStep, secondStep, hideDisabledTime, }: TimePickerProps): import("react/jsx-runtime").JSX.Element;
26
- export {};
@@ -1,24 +0,0 @@
1
- /**
2
- * TimeSelector.tsx
3
- * 시간 선택 UI 컴포넌트 (재사용 가능)
4
- *
5
- * @license MIT
6
- * @copyright 2025 김영진 (Kim Young Jin)
7
- * @author 김영진 (ehfuse@gmail.com)
8
- */
9
- export interface TimeSelectorProps {
10
- value: {
11
- hour: string;
12
- minute: string;
13
- second?: string;
14
- };
15
- onChange: (hour: number, minute: number, second?: number) => void;
16
- format: "HH:mm" | "HH:mm:ss" | "hh:mm" | "hh:mm:ss";
17
- minTime?: string;
18
- maxTime?: string;
19
- minuteStep?: number;
20
- secondStep?: number;
21
- showHeader?: boolean;
22
- hideDisabledTime?: boolean;
23
- }
24
- export declare function TimeSelector({ value, onChange, format, minTime, maxTime, minuteStep, secondStep, showHeader, hideDisabledTime, }: TimeSelectorProps): import("react/jsx-runtime").JSX.Element;
@@ -1,9 +0,0 @@
1
- /**
2
- * LabelSelect.tsx
3
- *
4
- * @license Proprietary License (독점 라이선스)
5
- * @copyright 2025 김영진 (Kim Young Jin)
6
- * @author 김영진 (ehfuse@gmail.com)
7
- */
8
- import { LabelSelectProps } from "./types";
9
- export declare function LabelSelect(props: LabelSelectProps): import("react/jsx-runtime").JSX.Element;
@@ -1,9 +0,0 @@
1
- /**
2
- * mui-label-select
3
- *
4
- * @license Proprietary License (독점 라이선스)
5
- * @copyright 2025 김영진 (Kim Young Jin)
6
- * @author 김영진 (ehfuse@gmail.com)
7
- */
8
- export { LabelSelect } from "./LabelSelect";
9
- export type { LabelSelectProps, LabelSelectOption, SelectChangeEvent, } from "./types";
@@ -1,38 +0,0 @@
1
- /**
2
- * types.ts
3
- *
4
- * @license Proprietary License (독점 라이선스)
5
- * @copyright 2025 김영진 (Kim Young Jin)
6
- * @author 김영진 (ehfuse@gmail.com)
7
- */
8
- import type { SxProps, Theme, FormControlProps } from "@mui/material";
9
- import { SelectProps, SelectChangeEvent } from "@mui/material";
10
- import { InputBaseComponentProps } from "@mui/material/InputBase";
11
- import type { CSSProperties } from "react";
12
- import type { FormLike } from "../types";
13
- export interface LabelSelectOption {
14
- value: string | number;
15
- label: string;
16
- }
17
- export interface LabelSelectProps extends Omit<SelectProps, "value" | "onChange" | "defaultValue" | "form"> {
18
- size?: "small" | "medium";
19
- label: string;
20
- value?: string | number;
21
- onChange?: (event: SelectChangeEvent<string | number>) => void;
22
- options: LabelSelectOption[];
23
- form?: FormLike | null;
24
- inputProps?: InputBaseComponentProps;
25
- enableWheel?: boolean;
26
- showLabel?: boolean;
27
- emptyLabel?: string;
28
- defaultValue?: string | number;
29
- readOnly?: boolean;
30
- readonly?: boolean;
31
- showEmptyOption?: boolean;
32
- className?: string;
33
- style?: CSSProperties;
34
- sx?: SxProps<Theme>;
35
- formControlProps?: Omit<FormControlProps, "children">;
36
- name?: string;
37
- }
38
- export type { SelectChangeEvent };
@@ -1,37 +0,0 @@
1
- /**
2
- * datetime.ts - 날짜시간 관련 유틸리티 함수
3
- *
4
- * @license MIT
5
- * @copyright 2025 김영진 (Kim Young Jin)
6
- * @author 김영진 (ehfuse@gmail.com)
7
- */
8
- import { TimeFormat } from "../types";
9
- /**
10
- * 윤년 체크
11
- */
12
- export declare function isLeapYear(year: number): boolean;
13
- /**
14
- * 해당 월의 말일 계산
15
- */
16
- export declare function getDaysInMonth(year: number, month: number): number;
17
- /**
18
- * 포맷에 따른 필드 개수 (2: 시:분, 3: 시:분:초)
19
- */
20
- export declare function getTimeFieldCount(format: TimeFormat): number;
21
- /**
22
- * 12시간 형식인지 확인
23
- */
24
- export declare function is12HourFormat(format: string): boolean;
25
- /**
26
- * 시간 유효성 검사
27
- * @param formatOrIs12Hour - TimeFormat 문자열 또는 12시간제 여부 boolean
28
- */
29
- export declare function validateTime(hour: string, minute: string, second: string, formatOrIs12Hour: TimeFormat | boolean, minTime?: string, maxTime?: string): boolean;
30
- /**
31
- * 날짜 값 제한 (년/월/일)
32
- */
33
- export declare function clampDateValue(value: string, type: "year" | "month" | "day", yearValue?: string, monthValue?: string): string;
34
- /**
35
- * 시간 값 제한 (시/분/초)
36
- */
37
- export declare function clampTimeValue(value: string, type: "hour" | "minute" | "second", is12Hour?: boolean): string;