@ehfuse/mui-form-controls 1.0.0 → 1.3.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/README.md CHANGED
@@ -19,6 +19,20 @@ MUI 기반 폼 컨트롤과 텍스트 필드 컴포넌트 모음
19
19
  | **DateTextField** | 달력 팝업, 다양한 날짜 포맷, 공휴일 표시 지원 날짜 필드 | [API](./docs/ko/api.md#datetextfield) |
20
20
  | **TimeTextField** | 시간 입력 필드 (자동 포맷팅, 시간 범위 제한) | [API](./docs/ko/api.md#timetextfield) |
21
21
 
22
+ ## 폼 컨트롤 (Form Controls)
23
+
24
+ | 컴포넌트 | 설명 | 문서 |
25
+ | ---------------- | --------------------------------------------------------- | ------------------------------------ |
26
+ | **Select** | MUI Select 기반 선택 필드 (라벨 미포함) | [API](./docs/ko/api.md#select) |
27
+ | **LabelSelect** | MUI Select 기반 선택 필드 (InputLabel, 포커스 기반 notch) | [API](./docs/ko/api.md#labelselect) |
28
+ | **Autocomplete** | 자동완성 기능이 있는 선택 필드 | [API](./docs/ko/api.md#autocomplete) |
29
+ | **Checkbox** | MUI Checkbox 래퍼 (폼 통합) | [API](./docs/ko/api.md#checkbox) |
30
+ | **RadioGroup** | MUI RadioGroup 래퍼 (폼 통합) | [API](./docs/ko/api.md#radiogroup) |
31
+ | **Switch** | MUI Switch 래퍼 (폼 통합) | [API](./docs/ko/api.md#switch) |
32
+ | **Slider** | MUI Slider 래퍼 (폼 통합) | [API](./docs/ko/api.md#slider) |
33
+ | **DateRange** | 날짜 범위 선택 필드 (시작일, 종료일) | [API](./docs/ko/api.md#daterange) |
34
+ | **TextArea** | 여러 줄 텍스트 입력 필드 | [API](./docs/ko/api.md#textarea) |
35
+
22
36
  ## 훅 (Hooks)
23
37
 
24
38
  | 훅 | 설명 | 문서 |
@@ -62,6 +76,15 @@ import {
62
76
  VerificationCodeTextField,
63
77
  DateTextField,
64
78
  TimeTextField,
79
+ Select,
80
+ LabelSelect,
81
+ Autocomplete,
82
+ Checkbox,
83
+ RadioGroup,
84
+ Switch,
85
+ Slider,
86
+ DateRange,
87
+ TextArea,
65
88
  useKoreanHolidays,
66
89
  useKoreanHolidaysRange,
67
90
  } from '@ehfuse/mui-form-controls';
@@ -157,6 +180,56 @@ import {
157
180
  minTime="09:00"
158
181
  maxTime="18:00"
159
182
  />
183
+
184
+ // 선택 필드 (라벨 없음)
185
+ <Select
186
+ name="status"
187
+ form={form}
188
+ options={[
189
+ { value: 'active', label: '활성' },
190
+ { value: 'inactive', label: '비활성' },
191
+ ]}
192
+ emptyLabel="상태 선택"
193
+ />
194
+
195
+ // 선택 필드 (라벨 포함)
196
+ <LabelSelect
197
+ name="category"
198
+ label="카테고리"
199
+ form={form}
200
+ options={[
201
+ { value: 'a', label: 'A' },
202
+ { value: 'b', label: 'B' },
203
+ ]}
204
+ />
205
+
206
+ // 자동완성 필드
207
+ <Autocomplete
208
+ name="department"
209
+ label="부서"
210
+ form={form}
211
+ options={[
212
+ { value: 'dev', label: '개발' },
213
+ { value: 'design', label: '디자인' },
214
+ ]}
215
+ />
216
+
217
+ // 날짜 범위
218
+ <DateRange
219
+ form={form}
220
+ startName="startDate"
221
+ endName="endDate"
222
+ startLabel="시작일"
223
+ endLabel="종료일"
224
+ />
225
+
226
+ // 텍스트 에어리어
227
+ <TextArea
228
+ name="memo"
229
+ label="메모"
230
+ form={form}
231
+ minRows={4}
232
+ />
160
233
  ```
161
234
 
162
235
  ## 문서 / Documentation
@@ -0,0 +1,9 @@
1
+ /**
2
+ * ButtonGroup.tsx
3
+ *
4
+ * @license MIT
5
+ * @copyright 2025 a8ud10a8uc601uc9c4 (Kim Young Jin)
6
+ * @author a8ud10a8uc601uc9c4 (ehfuse@gmail.com)
7
+ */
8
+ import type { ButtonGroupProps as MuiButtonGroupProps } from "@mui/material/ButtonGroup";
9
+ export declare const ButtonGroup: import("react").ForwardRefExoticComponent<Omit<MuiButtonGroupProps, "ref"> & import("react").RefAttributes<HTMLDivElement>>;
@@ -0,0 +1,9 @@
1
+ /**
2
+ * NumberField.tsx
3
+ *
4
+ * @license MIT
5
+ * @copyright 2025 김영진 (Kim Young Jin)
6
+ * @author 김영진 (ehfuse@gmail.com)
7
+ */
8
+ export { default as NumberField } from "./components/NumberField";
9
+ export { default as NumberSpinner } from "./components/NumberSpinner";
@@ -0,0 +1,10 @@
1
+ /**
2
+ * Rating.tsx
3
+ *
4
+ * @license MIT
5
+ * @copyright 2025 a8ud10a8uc601uc9c4 (Kim Young Jin)
6
+ * @author a8ud10a8uc601uc9c4 (ehfuse@gmail.com)
7
+ */
8
+ import React from "react";
9
+ import type { RatingProps } from "./types";
10
+ export declare const Rating: React.ForwardRefExoticComponent<Omit<RatingProps, "ref"> & React.RefAttributes<HTMLSpanElement>>;
@@ -0,0 +1,9 @@
1
+ /**
2
+ * Stepper.tsx
3
+ *
4
+ * @license MIT
5
+ * @copyright 2025 a8ud10a8uc601uc9c4 (Kim Young Jin)
6
+ * @author a8ud10a8uc601uc9c4 (ehfuse@gmail.com)
7
+ */
8
+ import type { StepperProps } from "./types";
9
+ export declare const Stepper: import("react").ForwardRefExoticComponent<Omit<StepperProps, "ref"> & import("react").RefAttributes<HTMLDivElement>>;
@@ -0,0 +1,10 @@
1
+ /**
2
+ * TextField.tsx
3
+ *
4
+ * @license MIT
5
+ * @copyright 2025 a8ud10a8uc601uc9c4 (Kim Young Jin)
6
+ * @author a8ud10a8uc601uc9c4 (ehfuse@gmail.com)
7
+ */
8
+ import React from "react";
9
+ import type { BaseTextFieldProps } from "./types";
10
+ export declare const TextField: React.ForwardRefExoticComponent<(Omit<import("@mui/material").FilledTextFieldProps & BaseTextFieldProps, "ref"> | Omit<import("@mui/material").OutlinedTextFieldProps & BaseTextFieldProps, "ref"> | Omit<import("@mui/material").StandardTextFieldProps & BaseTextFieldProps, "ref">) & React.RefAttributes<HTMLDivElement>>;
@@ -0,0 +1,10 @@
1
+ /**
2
+ * ToggleButton.tsx
3
+ *
4
+ * @license MIT
5
+ * @copyright 2025 a8ud10a8uc601uc9c4 (Kim Young Jin)
6
+ * @author a8ud10a8uc601uc9c4 (ehfuse@gmail.com)
7
+ */
8
+ import React from "react";
9
+ import type { ToggleButtonProps } from "./types";
10
+ export declare const ToggleButton: React.ForwardRefExoticComponent<Omit<ToggleButtonProps, "ref"> & React.RefAttributes<HTMLButtonElement>>;
@@ -0,0 +1,7 @@
1
+ import * as React from "react";
2
+ import { NumberField as BaseNumberField } from "@base-ui/react/number-field";
3
+ export default function NumberField({ id: idProp, label, error, size, ...other }: BaseNumberField.Root.Props & {
4
+ label?: React.ReactNode;
5
+ size?: "small" | "medium";
6
+ error?: boolean;
7
+ }): import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,7 @@
1
+ import * as React from "react";
2
+ import { NumberField as BaseNumberField } from "@base-ui/react/number-field";
3
+ export default function NumberSpinner({ id: idProp, label, error, size, ...other }: BaseNumberField.Root.Props & {
4
+ label?: React.ReactNode;
5
+ size?: "small" | "medium";
6
+ error?: boolean;
7
+ }): import("react/jsx-runtime").JSX.Element;
@@ -2,3 +2,5 @@ export { GroupedInputWrapper } from "./GroupedInputWrapper";
2
2
  export type { GroupedInputWrapperProps } from "./GroupedInputWrapper";
3
3
  export { ColonBox } from "./ColonBox";
4
4
  export type { ColonBoxProps } from "./ColonBox";
5
+ export { default as NumberField } from "./NumberField";
6
+ export { default as NumberSpinner } from "./NumberSpinner";
package/dist/index.d.ts CHANGED
@@ -8,12 +8,18 @@
8
8
  export { SearchTextField } from "./SearchTextField";
9
9
  export { ClearTextField } from "./ClearTextField";
10
10
  export { PasswordTextField } from "./PasswordTextField";
11
+ export { TextField } from "./TextField";
11
12
  export { TextArea } from "./TextArea";
12
13
  export { Checkbox } from "./Checkbox";
13
14
  export { RadioGroup } from "./RadioGroup";
14
15
  export { Switch } from "./Switch";
16
+ export { Rating } from "./Rating";
17
+ export { ToggleButton } from "./ToggleButton";
18
+ export { ButtonGroup } from "./ButtonGroup";
15
19
  export { DateRange } from "./DateRange";
16
20
  export { Slider } from "./Slider";
21
+ export { Stepper } from "./Stepper";
22
+ export { NumberField, NumberSpinner } from "./NumberField";
17
23
  export { Autocomplete } from "./Autocomplete";
18
24
  export { Select } from "./Select";
19
25
  export { LabelSelect } from "./LabelSelect";
@@ -30,4 +36,4 @@ export { BizNumTextField } from "./BizNumTextField";
30
36
  export { CardNumTextField } from "./CardNumTextField";
31
37
  export { useKoreanHolidays, useKoreanHolidaysRange } from "./hooks";
32
38
  export { CardIcon, VisaIcon, MastercardIcon, AmexIcon, JcbIcon, DinersIcon, DiscoverIcon, UnionPayIcon, BcIcon, } from "./icons";
33
- export type { SearchTextFieldProps, ClearTextFieldProps, PasswordTextFieldProps, TextAreaProps, CheckboxProps, SwitchProps, RadioGroupProps, RadioOption, DateRangeProps, SliderProps, AutocompleteProps, AutocompleteOption, SelectProps, SelectOption, LabelSelectProps, LabelSelectOption, PasswordValidationRules, PasswordValidationResult, PhoneTextFieldProps, PhoneFormat, AddressTextFieldProps, DaumPostcodeData, NumberTextFieldProps, JuminTextFieldProps, JuminInfo, VerificationCodeTextFieldProps, VerificationCodeType, EmailTextFieldProps, CustomDomain, DateTextFieldProps, DateFormat, TimeTextFieldProps, TimeFormat, DateTimeTextFieldProps, DateTimeFormat, BizNumTextFieldProps, CardNumTextFieldProps, SelectChangeEvent, } from "./types";
39
+ export type { SearchTextFieldProps, ClearTextFieldProps, PasswordTextFieldProps, TextFieldProps, TextAreaProps, CheckboxProps, SwitchProps, RadioGroupProps, RadioOption, DateRangeProps, SliderProps, RatingProps, ToggleButtonProps, ButtonGroupProps, StepperProps, AutocompleteProps, AutocompleteOption, SelectProps, SelectOption, LabelSelectProps, LabelSelectOption, PasswordValidationRules, PasswordValidationResult, PhoneTextFieldProps, PhoneFormat, AddressTextFieldProps, DaumPostcodeData, NumberTextFieldProps, JuminTextFieldProps, JuminInfo, VerificationCodeTextFieldProps, VerificationCodeType, EmailTextFieldProps, CustomDomain, DateTextFieldProps, DateFormat, TimeTextFieldProps, TimeFormat, DateTimeTextFieldProps, DateTimeFormat, BizNumTextFieldProps, CardNumTextFieldProps, SelectChangeEvent, } from "./types";