@aivex/ui 1.1.0-dev.6 → 1.1.0-dev.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/components/SelectBox/SelectBox.d.ts +34 -0
- package/dist/components/SelectBox/index.d.ts +2 -0
- package/dist/components/Textbox/Textbox.d.ts +1 -3
- package/dist/index.cjs +41 -1
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.js +4173 -1591
- package/dist/index.js.map +1 -1
- package/dist/styles.css +1 -1
- package/package.json +2 -1
- package/dist/components/Select/Select.d.ts +0 -13
- package/dist/components/Select/index.d.ts +0 -2
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
export interface SelectBoxOption {
|
|
2
|
+
value: string;
|
|
3
|
+
label: string;
|
|
4
|
+
/** option의 key. 미지정 시 value 사용 */
|
|
5
|
+
key?: string;
|
|
6
|
+
/** 위험 액션 강조 (빨간색) */
|
|
7
|
+
danger?: boolean;
|
|
8
|
+
}
|
|
9
|
+
export interface SelectBoxGroup {
|
|
10
|
+
/** 그룹 타이틀 */
|
|
11
|
+
title?: string;
|
|
12
|
+
options: SelectBoxOption[];
|
|
13
|
+
}
|
|
14
|
+
export interface SelectBoxProps {
|
|
15
|
+
groups: SelectBoxGroup[];
|
|
16
|
+
value?: string;
|
|
17
|
+
placeholder?: string;
|
|
18
|
+
disabled?: boolean;
|
|
19
|
+
size?: "sm" | "md";
|
|
20
|
+
onChange?: (value: string) => void;
|
|
21
|
+
/**
|
|
22
|
+
* 선택된 값이 트리거에 표시될 텍스트를 커스텀하는 함수.
|
|
23
|
+
* 미지정 시 option.label 을 그대로 표시.
|
|
24
|
+
* @example renderValue={(option, group) => `${group.title} / ${option.label}`}
|
|
25
|
+
*/
|
|
26
|
+
renderValue?: (option: SelectBoxOption, group: SelectBoxGroup) => string;
|
|
27
|
+
/** 최외곽 래퍼에 추가할 className */
|
|
28
|
+
className?: string;
|
|
29
|
+
label?: string;
|
|
30
|
+
helperText?: string;
|
|
31
|
+
error?: boolean;
|
|
32
|
+
}
|
|
33
|
+
declare function SelectBox({ groups, value, placeholder, disabled, size, onChange, renderValue, className, label, helperText, error, }: SelectBoxProps): import("react/jsx-runtime").JSX.Element;
|
|
34
|
+
export { SelectBox };
|
|
@@ -12,9 +12,7 @@ export interface TextboxProps extends Omit<InputHTMLAttributes<HTMLInputElement>
|
|
|
12
12
|
leadingElement?: ReactNode;
|
|
13
13
|
/** 인풋 우측 슬롯 (clearable=true 이고 값이 있으면 삭제 버튼이 추가됨) */
|
|
14
14
|
trailingElement?: ReactNode;
|
|
15
|
-
/** InputBase 컨테이너에 적용할 className */
|
|
16
|
-
containerClassName?: string;
|
|
17
15
|
ref?: Ref<HTMLInputElement>;
|
|
18
16
|
}
|
|
19
|
-
declare function Textbox({ className,
|
|
17
|
+
declare function Textbox({ className, label, helperText, error, disabled, clearable, leadingElement, trailingElement, size, id, ref, value, defaultValue, onChange, onFocus, onBlur, ...props }: TextboxProps): import("react/jsx-runtime").JSX.Element;
|
|
20
18
|
export { inputContainerVariants as inputWrapperVariants, Textbox };
|