@ehfuse/mui-form-controls 3.3.6 → 3.3.7
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/FormControlsConfig.d.ts +24 -0
- package/dist/index.d.ts +2 -0
- package/dist/index.js +14 -1
- package/dist/index.js.map +4 -4
- package/dist/index.mjs +14 -1
- package/dist/index.mjs.map +4 -4
- package/dist/types.d.ts +3 -0
- package/package.json +2 -2
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* FormControlsConfig.tsx
|
|
3
|
+
*
|
|
4
|
+
* 앱 전체에 걸 기본값 — 날짜·시간 칸마다 prop 을 달지 않고 한 곳에서 켠다.
|
|
5
|
+
* 지금은 `pickerCentered`(달력·시간 선택을 칸 옆 팝오버 대신 화면 가운데 창으로) 하나다.
|
|
6
|
+
* 휴대폰에서는 칸 바로 아래 뜨는 팝오버가 화면 끝에 걸리거나 키보드·하단 막대에 가려 쓰기 불편해서,
|
|
7
|
+
* 앱이 좁은 화면일 때만 `<FormControlsConfigProvider pickerCentered>` 로 감싸 쓰게 한다.
|
|
8
|
+
* 칸에 `pickerCentered` 를 직접 주면 그 값이 이긴다. Provider 가 없으면 예전 동작(팝오버) 그대로다.
|
|
9
|
+
*
|
|
10
|
+
* @license MIT
|
|
11
|
+
* @copyright 2025 김영진 (Kim Young Jin)
|
|
12
|
+
* @author 김영진 (ehfuse@gmail.com)
|
|
13
|
+
*/
|
|
14
|
+
import { type ReactNode } from "react";
|
|
15
|
+
/** 앱 전체 기본값. */
|
|
16
|
+
export interface FormControlsConfig {
|
|
17
|
+
pickerCentered?: boolean;
|
|
18
|
+
}
|
|
19
|
+
/** 앱 전체 기본값을 건다. */
|
|
20
|
+
export declare function FormControlsConfigProvider({ children, ...config }: FormControlsConfig & {
|
|
21
|
+
children: ReactNode;
|
|
22
|
+
}): import("react/jsx-runtime").JSX.Element;
|
|
23
|
+
/** 칸 값이 있으면 그것을, 없으면 앱 기본값을 쓴다(날짜·시간 칸 안에서 부른다). */
|
|
24
|
+
export declare function usePickerCentered(own: boolean | undefined): boolean;
|
package/dist/index.d.ts
CHANGED
|
@@ -5,6 +5,8 @@
|
|
|
5
5
|
* @copyright 2025 김영진 (Kim Young Jin)
|
|
6
6
|
* @author 김영진 (ehfuse@gmail.com)
|
|
7
7
|
*/
|
|
8
|
+
export { FormControlsConfigProvider, usePickerCentered } from "./FormControlsConfig";
|
|
9
|
+
export type { FormControlsConfig } from "./FormControlsConfig";
|
|
8
10
|
export { SearchTextField } from "./SearchTextField";
|
|
9
11
|
export { ClearTextField } from "./ClearTextField";
|
|
10
12
|
export { TagsTextField } from "./TagsTextField";
|