@ehfuse/mui-form-controls 3.0.2 → 3.0.4

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
@@ -40,6 +40,10 @@ export type BaseTextFieldProps = {
40
40
  debounce?: number;
41
41
  form?: FormLike | null;
42
42
  };
43
+ export type LongPressToggleProps = {
44
+ toggleOnLongPress?: boolean;
45
+ longPressDelay?: number;
46
+ };
43
47
  export type TextAreaProps = BaseTextFieldProps & {
44
48
  label?: string;
45
49
  value?: string;
@@ -56,13 +60,13 @@ export type TextAreaProps = BaseTextFieldProps & {
56
60
  inputProps?: React.TextareaHTMLAttributes<HTMLTextAreaElement>;
57
61
  inputRef?: React.Ref<HTMLTextAreaElement>;
58
62
  };
59
- export type CheckboxProps = Omit<MuiCheckboxProps, "checked" | "onChange" | "form"> & BaseTextFieldProps & {
63
+ export type CheckboxProps = Omit<MuiCheckboxProps, "checked" | "onChange" | "form"> & BaseTextFieldProps & LongPressToggleProps & {
60
64
  name?: string;
61
65
  checked?: boolean;
62
66
  label?: React.ReactNode;
63
67
  onChange?: (event: React.ChangeEvent<HTMLInputElement>, checked: boolean) => void;
64
68
  };
65
- export type SwitchProps = Omit<MuiSwitchProps, "checked" | "onChange" | "form"> & BaseTextFieldProps & {
69
+ export type SwitchProps = Omit<MuiSwitchProps, "checked" | "onChange" | "form"> & BaseTextFieldProps & LongPressToggleProps & {
66
70
  name?: string;
67
71
  checked?: boolean;
68
72
  label?: React.ReactNode;
@@ -147,7 +151,11 @@ export type AutocompleteProps = Omit<MuiAutocompleteProps<AutocompleteOption, fa
147
151
  export type LabelSelectOption = {
148
152
  value: string | number | boolean;
149
153
  label: string;
150
- /** `true`면 목록에는 보이지만 선택할 수 없습니다. */
154
+ /** `true`면 해당 옵션은 선택할 수 없습니다. */
155
+ readonly?: boolean;
156
+ /**
157
+ * 선택은 가능합니다. 목록에서 회색 등 시각적 구분용(스타일은 추후 적용 가능).
158
+ */
151
159
  disabled?: boolean;
152
160
  /** 호버 시 브라우저 기본 툴팁(네이티브 `title`)로 표시할 안내 문구입니다. */
153
161
  title?: string;
@@ -161,7 +169,6 @@ export type LabelSelectProps = Omit<MuiSelectProps, "value" | "onChange" | "defa
161
169
  enableWheel?: boolean;
162
170
  showLabel?: boolean;
163
171
  emptyLabel?: string;
164
- readOnly?: boolean;
165
172
  showEmptyOption?: boolean;
166
173
  fullWidth?: boolean;
167
174
  formControlProps?: Omit<FormControlProps, "children">;
@@ -0,0 +1,19 @@
1
+ import * as React from "react";
2
+ type ToggleChangeHandler = (event: React.ChangeEvent<HTMLInputElement>, checked: boolean) => void;
3
+ type LongPressToggleHandlerProps = {
4
+ onClick?: React.MouseEventHandler<HTMLButtonElement>;
5
+ onPointerDown?: React.PointerEventHandler<HTMLButtonElement>;
6
+ onPointerUp?: React.PointerEventHandler<HTMLButtonElement>;
7
+ onPointerLeave?: React.PointerEventHandler<HTMLButtonElement>;
8
+ onPointerCancel?: React.PointerEventHandler<HTMLButtonElement>;
9
+ };
10
+ type UseLongPressToggleOptions = LongPressToggleHandlerProps & {
11
+ checked?: boolean;
12
+ disabled?: boolean;
13
+ name?: string;
14
+ longPressDelay?: number;
15
+ toggleOnLongPress?: boolean;
16
+ onChange?: ToggleChangeHandler;
17
+ };
18
+ export declare function useLongPressToggle({ checked, disabled, name, longPressDelay, toggleOnLongPress, onChange, onClick, onPointerDown, onPointerUp, onPointerLeave, onPointerCancel, }: UseLongPressToggleOptions): LongPressToggleHandlerProps;
19
+ export {};
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ehfuse/mui-form-controls",
3
- "version": "3.0.2",
3
+ "version": "3.0.4",
4
4
  "description": "Material-UI form controls and text fields for complex forms",
5
5
  "private": false,
6
6
  "publishConfig": {
package/dist/Select.d.ts DELETED
@@ -1,10 +0,0 @@
1
- /**
2
- * Select.tsx
3
- *
4
- * @license MIT
5
- * @copyright 2025 Kim Young Jin
6
- * @author Kim Young Jin (ehfuse@gmail.com)
7
- */
8
- import React from "react";
9
- import type { SelectProps } from "./types";
10
- export declare const Select: React.ForwardRefExoticComponent<Omit<SelectProps, "ref"> & React.RefAttributes<HTMLDivElement>>;
@@ -1,10 +0,0 @@
1
- /**
2
- * SwitchField.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 { SwitchFieldProps } from "./types";
10
- export declare const SwitchField: React.ForwardRefExoticComponent<Omit<SwitchFieldProps, "ref"> & React.RefAttributes<HTMLButtonElement>>;
@@ -1,10 +0,0 @@
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>>;