@ehfuse/mui-form-controls 3.1.48 → 3.1.50

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.
@@ -0,0 +1,34 @@
1
+ /**
2
+ * ReadonlyDisplay.tsx
3
+ *
4
+ * readonly 입력칸을 "실제 <input> 없이" 그리는 경량 표시 컴포넌트.
5
+ *
6
+ * 배경: readonly 필드도 기본은 MUI TextField(내부 input + IME/상태 훅 + 인스턴스별 sx)를 렌더한다.
7
+ * 상품 목록처럼 readonly 필드가 수백 개면 이 입력 머신러리 비용이 커서 화면이 느려진다.
8
+ * `readonlyLight` prop 을 켜면 이 컴포넌트로 대체돼, outlined 입력칸과 동일한 외관(노치 라벨 + 테두리)을
9
+ * fieldset/legend 로 재현하되 실제 입력 요소를 만들지 않아 렌더 비용이 크게 낮아진다.
10
+ *
11
+ * 외관은 MUI OutlinedInput 마크업(fieldset+legend)을 그대로 따르므로 테마의 기본 테두리/반경/색을 물려받는다.
12
+ *
13
+ * @license MIT
14
+ * @copyright 2025 김영진 (Kim Young Jin)
15
+ * @author 김영진 (ehfuse@gmail.com)
16
+ */
17
+ import React from "react";
18
+ import type { SxProps, Theme } from "@mui/material/styles";
19
+ /** ReadonlyDisplay 속성. */
20
+ export interface ReadonlyDisplayProps {
21
+ label?: React.ReactNode;
22
+ value?: React.ReactNode;
23
+ prefix?: React.ReactNode;
24
+ suffix?: React.ReactNode;
25
+ /** suffix/prefix 를 값이 있을 때만 표시할지 여부. */
26
+ showAffixOnlyWithValue?: boolean;
27
+ align?: "left" | "right" | "center";
28
+ size?: "small" | "medium";
29
+ fullWidth?: boolean;
30
+ className?: string;
31
+ sx?: SxProps<Theme>;
32
+ }
33
+ /** readonly 입력칸을 실제 input 없이 그리는 경량 표시 컴포넌트. */
34
+ export declare function ReadonlyDisplay({ label, value, prefix, suffix, showAffixOnlyWithValue, align, size, fullWidth, className, sx, }: ReadonlyDisplayProps): import("react/jsx-runtime").JSX.Element;
package/dist/index.d.ts CHANGED
@@ -39,5 +39,7 @@ export { DateTimeTextField } from "./DateTimeTextField";
39
39
  export { BizNumTextField } from "./BizNumTextField";
40
40
  export { CardNumTextField } from "./CardNumTextField";
41
41
  export { useKoreanHolidays, useKoreanHolidaysRange } from "./hooks";
42
+ export { ReadonlyDisplay } from "./components/ReadonlyDisplay";
43
+ export type { ReadonlyDisplayProps } from "./components/ReadonlyDisplay";
42
44
  export { CardIcon, VisaIcon, MastercardIcon, AmexIcon, JcbIcon, DinersIcon, DiscoverIcon, UnionPayIcon, BcIcon, } from "./icons";
43
45
  export type { SearchTextFieldProps, ClearTextFieldProps, TagsTextFieldProps, PasswordTextFieldProps, TextFieldProps, TextAreaProps, CheckboxProps, SwitchProps, RadioGroupProps, RadioOption, DateRangeProps, SliderProps, RatingProps, ToggleButtonProps, ToggleButtonGroupProps, ToggleButtonGroupOption, ButtonGroupProps, StepperProps, AutocompleteProps, AutocompleteOption, SelectProps, SelectOption, LabelSelectProps, LabelSelectOption, AddressTextFieldProps, DaumPostcodeData, PasswordValidationRules, PasswordValidationResult, PhoneTextFieldProps, PhoneFormat, NumberTextFieldProps, JuminTextFieldProps, JuminInfo, VerificationCodeTextFieldProps, VerificationCodeType, EmailTextFieldProps, CustomDomain, DateTextFieldProps, DateFormat, TimeTextFieldProps, TimeFormat, DateTimeTextFieldProps, DateTimeFormat, BizNumTextFieldProps, CardNumTextFieldProps, CardNumTextFieldHandle, SelectChangeEvent, } from "./types";