@ehfuse/mui-form-controls 1.3.21 → 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 +9 -10
- package/dist/ToggleButtonGroup.d.ts +10 -0
- package/dist/index.d.ts +2 -3
- package/dist/index.js +2 -9
- package/dist/index.js.map +4 -4
- package/dist/index.mjs +2 -9
- package/dist/index.mjs.map +4 -4
- package/dist/types.d.ts +3 -9
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -42,9 +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) |
|
|
47
|
-
| **
|
|
46
|
+
| **ToggleButtonGroup** | 옵션 기반 토글 그룹 필드 (`ToggleButtonGroup` + form 바인딩) | [API](./docs/ko/api.md#togglebuttongroup) |
|
|
48
47
|
|
|
49
48
|
## 훅 (Hooks)
|
|
50
49
|
|
|
@@ -94,7 +93,7 @@ import {
|
|
|
94
93
|
TextField,
|
|
95
94
|
Rating,
|
|
96
95
|
ToggleButton,
|
|
97
|
-
|
|
96
|
+
ToggleButtonGroup,
|
|
98
97
|
ButtonGroup,
|
|
99
98
|
Stepper,
|
|
100
99
|
NumberField,
|
|
@@ -105,7 +104,7 @@ import {
|
|
|
105
104
|
Checkbox,
|
|
106
105
|
RadioGroup,
|
|
107
106
|
Switch,
|
|
108
|
-
|
|
107
|
+
ToggleButtonGroup,
|
|
109
108
|
Slider,
|
|
110
109
|
DateRange,
|
|
111
110
|
TextArea,
|
|
@@ -261,26 +260,26 @@ import {
|
|
|
261
260
|
`Switch`를 boolean 입력의 기본 form-binding 컴포넌트로 사용합니다.
|
|
262
261
|
|
|
263
262
|
```tsx
|
|
264
|
-
import { Switch
|
|
263
|
+
import { Switch } from "@ehfuse/mui-form-controls";
|
|
265
264
|
|
|
266
265
|
// 1) 단일 스위치 (라벨 없음)
|
|
267
266
|
<Switch form={form} name="deceased_disability_certificate" />
|
|
268
267
|
|
|
269
268
|
// 2) 라벨 포함 스위치 (권장)
|
|
270
|
-
<
|
|
269
|
+
<Switch
|
|
271
270
|
form={form}
|
|
272
271
|
name="deceased_disability_certificate"
|
|
273
272
|
label="장애인 증명서 제출"
|
|
274
273
|
/>
|
|
275
274
|
|
|
276
275
|
// 3) readOnly / disabled
|
|
277
|
-
<
|
|
276
|
+
<Switch
|
|
278
277
|
form={form}
|
|
279
278
|
name="deceased_disability_certificate"
|
|
280
279
|
label="수정 불가 항목"
|
|
281
280
|
readonly
|
|
282
281
|
/>
|
|
283
|
-
<
|
|
282
|
+
<Switch
|
|
284
283
|
form={form}
|
|
285
284
|
name="deceased_disability_certificate"
|
|
286
285
|
label="비활성 항목"
|
|
@@ -291,9 +290,9 @@ import { Switch, SwitchField } from "@ehfuse/mui-form-controls";
|
|
|
291
290
|
## Toggle 그룹 표준 패턴
|
|
292
291
|
|
|
293
292
|
```tsx
|
|
294
|
-
import {
|
|
293
|
+
import { ToggleButtonGroup } from "@ehfuse/mui-form-controls";
|
|
295
294
|
|
|
296
|
-
<
|
|
295
|
+
<ToggleButtonGroup
|
|
297
296
|
form={form}
|
|
298
297
|
name="contractor_gender"
|
|
299
298
|
exclusive
|
|
@@ -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>>;
|
package/dist/index.d.ts
CHANGED
|
@@ -13,10 +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";
|
|
19
|
-
export {
|
|
18
|
+
export { ToggleButtonGroup } from "./ToggleButtonGroup";
|
|
20
19
|
export { ButtonGroup } from "./ButtonGroup";
|
|
21
20
|
export { DateRange } from "./DateRange";
|
|
22
21
|
export { Slider } from "./Slider";
|
|
@@ -39,4 +38,4 @@ export { BizNumTextField } from "./BizNumTextField";
|
|
|
39
38
|
export { CardNumTextField } from "./CardNumTextField";
|
|
40
39
|
export { useKoreanHolidays, useKoreanHolidaysRange } from "./hooks";
|
|
41
40
|
export { CardIcon, VisaIcon, MastercardIcon, AmexIcon, JcbIcon, DinersIcon, DiscoverIcon, UnionPayIcon, BcIcon, } from "./icons";
|
|
42
|
-
export type { SearchTextFieldProps, ClearTextFieldProps, PasswordTextFieldProps, TextFieldProps, TextAreaProps, CheckboxProps, SwitchProps,
|
|
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";
|