@lawkit/ui 0.1.47 → 0.1.49
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.
|
@@ -54,4 +54,13 @@ export declare const option: import('@vanilla-extract/recipes').RuntimeFn<{
|
|
|
54
54
|
false: {};
|
|
55
55
|
};
|
|
56
56
|
}>;
|
|
57
|
+
export declare const richOption: import('@vanilla-extract/recipes').RuntimeFn<{
|
|
58
|
+
highlighted: {
|
|
59
|
+
true: {
|
|
60
|
+
backgroundColor: "#f1f4f9";
|
|
61
|
+
};
|
|
62
|
+
false: {};
|
|
63
|
+
};
|
|
64
|
+
}>;
|
|
65
|
+
export declare const footer: string;
|
|
57
66
|
export declare const noResult: string;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { InputHTMLAttributes } from 'react';
|
|
1
|
+
import { InputHTMLAttributes, ReactNode } from 'react';
|
|
2
2
|
export interface AutoCompleteOption {
|
|
3
3
|
/** 고유 값 */
|
|
4
4
|
value: string;
|
|
@@ -25,6 +25,21 @@ export interface AutoCompleteProps extends Omit<InputHTMLAttributes<HTMLInputEle
|
|
|
25
25
|
noResultText?: string;
|
|
26
26
|
/** wrapper className */
|
|
27
27
|
className?: string;
|
|
28
|
+
/**
|
|
29
|
+
* 옵션 행 커스텀 렌더(리치 옵션). 주어지면 `label` 대신 이 결과를 행 내용으로 렌더한다.
|
|
30
|
+
* MUI `renderOption` / Ant `optionRender`와 같은 패턴.
|
|
31
|
+
*/
|
|
32
|
+
renderOption?: (option: AutoCompleteOption, state: {
|
|
33
|
+
highlighted: boolean;
|
|
34
|
+
selected: boolean;
|
|
35
|
+
}) => ReactNode;
|
|
36
|
+
/** 드롭다운 하단 슬롯(예: "검색 결과에 없으면 신규 등록"). 결과 유무와 무관하게 표시된다. */
|
|
37
|
+
footer?: ReactNode;
|
|
38
|
+
/**
|
|
39
|
+
* multiple 모드에서 선택된 옵션을 목록에서 빼지 않고 유지한다(선택 표시·클릭 토글).
|
|
40
|
+
* 기본 false(선택 시 목록에서 제외하고 badge로만 표시). dz
|
|
41
|
+
*/
|
|
42
|
+
showSelectedInList?: boolean;
|
|
28
43
|
}
|
|
29
44
|
/**
|
|
30
45
|
* **AutoComplete**
|
|
@@ -38,4 +53,4 @@ export interface AutoCompleteProps extends Omit<InputHTMLAttributes<HTMLInputEle
|
|
|
38
53
|
* - `onInputChange`: 입력 텍스트 변경 콜백 (서버 필터링 등)
|
|
39
54
|
* - `inputSize`: small(30) / medium(38) / large(46)
|
|
40
55
|
*/
|
|
41
|
-
export declare function AutoComplete({ options, multiple, value, onChange, onInputChange, inputSize, disabled, noResultText, placeholder, className, ...rest }: AutoCompleteProps): import("react/jsx-runtime").JSX.Element;
|
|
56
|
+
export declare function AutoComplete({ options, multiple, value, onChange, onInputChange, inputSize, disabled, noResultText, placeholder, className, renderOption, footer, showSelectedInList, ...rest }: AutoCompleteProps): import("react/jsx-runtime").JSX.Element;
|