@ehfuse/mui-form-controls 1.3.20 → 2.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/README.md CHANGED
@@ -42,8 +42,8 @@ MUI 기반 폼 컨트롤과 텍스트 필드 컴포넌트 모음
42
42
  | **Slider** | MUI Slider 래퍼 (폼 통합) | [API](./docs/ko/api.md#slider) |
43
43
  | **Stepper** | 스텝 진행 표시 컴포넌트 | [API](./docs/ko/api.md#stepper) |
44
44
  | **Switch** | MUI Switch 래퍼 (폼 통합) | [API](./docs/ko/api.md#switch) |
45
- | **SwitchField** | 라벨 포함 Switch 필드 (`FormControlLabel` + `Switch`) | [API](./docs/ko/api.md#switchfield) |
46
45
  | **ToggleButton** | 토글 버튼 컴포넌트 | [API](./docs/ko/api.md#togglebutton) |
46
+ | **ToggleButtonGroup** | 옵션 기반 토글 그룹 필드 (`ToggleButtonGroup` + form 바인딩) | [API](./docs/ko/api.md#togglebuttongroup) |
47
47
 
48
48
  ## 훅 (Hooks)
49
49
 
@@ -93,6 +93,7 @@ import {
93
93
  TextField,
94
94
  Rating,
95
95
  ToggleButton,
96
+ ToggleButtonGroup,
96
97
  ButtonGroup,
97
98
  Stepper,
98
99
  NumberField,
@@ -103,7 +104,7 @@ import {
103
104
  Checkbox,
104
105
  RadioGroup,
105
106
  Switch,
106
- SwitchField,
107
+ ToggleButtonGroup,
107
108
  Slider,
108
109
  DateRange,
109
110
  TextArea,
@@ -259,26 +260,26 @@ import {
259
260
  `Switch`를 boolean 입력의 기본 form-binding 컴포넌트로 사용합니다.
260
261
 
261
262
  ```tsx
262
- import { Switch, SwitchField } from "@ehfuse/mui-form-controls";
263
+ import { Switch } from "@ehfuse/mui-form-controls";
263
264
 
264
265
  // 1) 단일 스위치 (라벨 없음)
265
266
  <Switch form={form} name="deceased_disability_certificate" />
266
267
 
267
268
  // 2) 라벨 포함 스위치 (권장)
268
- <SwitchField
269
+ <Switch
269
270
  form={form}
270
271
  name="deceased_disability_certificate"
271
272
  label="장애인 증명서 제출"
272
273
  />
273
274
 
274
275
  // 3) readOnly / disabled
275
- <SwitchField
276
+ <Switch
276
277
  form={form}
277
278
  name="deceased_disability_certificate"
278
279
  label="수정 불가 항목"
279
280
  readonly
280
281
  />
281
- <SwitchField
282
+ <Switch
282
283
  form={form}
283
284
  name="deceased_disability_certificate"
284
285
  label="비활성 항목"
@@ -286,6 +287,25 @@ import { Switch, SwitchField } from "@ehfuse/mui-form-controls";
286
287
  />
287
288
  ```
288
289
 
290
+ ## Toggle 그룹 표준 패턴
291
+
292
+ ```tsx
293
+ import { ToggleButtonGroup } from "@ehfuse/mui-form-controls";
294
+
295
+ <ToggleButtonGroup
296
+ form={form}
297
+ name="contractor_gender"
298
+ exclusive
299
+ options={[
300
+ { label: "남성", value: "M" },
301
+ { label: "여성", value: "F" },
302
+ ]}
303
+ onDeselect="clear"
304
+ fullWidth
305
+ size="small"
306
+ />
307
+ ```
308
+
289
309
  ## 문서 / Documentation
290
310
 
291
311
  - [한국어 문서](./docs/ko/getting-started.md)
@@ -0,0 +1,10 @@
1
+ /**
2
+ * ToggleButtonGroup.tsx
3
+ *
4
+ * @license MIT
5
+ * @copyright 2025 김영진 (Kim Young Jin)
6
+ * @author 김영진 (ehfuse@gmail.com)
7
+ */
8
+ import React from "react";
9
+ import type { ToggleButtonGroupProps } from "./types";
10
+ export declare const ToggleButtonGroup: React.ForwardRefExoticComponent<Omit<ToggleButtonGroupProps, "ref"> & React.RefAttributes<HTMLDivElement>>;
@@ -0,0 +1,10 @@
1
+ /**
2
+ * ToggleButtonGroupField.tsx
3
+ *
4
+ * @license MIT
5
+ * @copyright 2025 김영진 (Kim Young Jin)
6
+ * @author 김영진 (ehfuse@gmail.com)
7
+ */
8
+ import React from "react";
9
+ import type { ToggleButtonGroupFieldProps } from "./types";
10
+ export declare const ToggleButtonGroupField: React.ForwardRefExoticComponent<Omit<ToggleButtonGroupFieldProps, "ref"> & React.RefAttributes<HTMLDivElement>>;
package/dist/index.d.ts CHANGED
@@ -13,9 +13,9 @@ export { TextArea } from "./TextArea";
13
13
  export { Checkbox } from "./Checkbox";
14
14
  export { RadioGroup } from "./RadioGroup";
15
15
  export { Switch } from "./Switch";
16
- export { SwitchField } from "./SwitchField";
17
16
  export { Rating } from "./Rating";
18
17
  export { ToggleButton } from "./ToggleButton";
18
+ export { ToggleButtonGroup } from "./ToggleButtonGroup";
19
19
  export { ButtonGroup } from "./ButtonGroup";
20
20
  export { DateRange } from "./DateRange";
21
21
  export { Slider } from "./Slider";
@@ -38,4 +38,4 @@ export { BizNumTextField } from "./BizNumTextField";
38
38
  export { CardNumTextField } from "./CardNumTextField";
39
39
  export { useKoreanHolidays, useKoreanHolidaysRange } from "./hooks";
40
40
  export { CardIcon, VisaIcon, MastercardIcon, AmexIcon, JcbIcon, DinersIcon, DiscoverIcon, UnionPayIcon, BcIcon, } from "./icons";
41
- export type { SearchTextFieldProps, ClearTextFieldProps, PasswordTextFieldProps, TextFieldProps, TextAreaProps, CheckboxProps, SwitchProps, SwitchFieldProps, 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";
41
+ export type { SearchTextFieldProps, ClearTextFieldProps, PasswordTextFieldProps, TextFieldProps, TextAreaProps, CheckboxProps, SwitchProps, RadioGroupProps, RadioOption, DateRangeProps, SliderProps, RatingProps, ToggleButtonProps, ToggleButtonGroupProps, ToggleButtonGroupOption, 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";