@aivex/ui 1.1.0-dev.8 → 1.1.0-dev.9

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.
@@ -1,5 +1,5 @@
1
1
  import { type InputHTMLAttributes, type Ref } from "react";
2
- export interface TagboxProps extends Omit<InputHTMLAttributes<HTMLInputElement>, "size" | "value" | "onChange"> {
2
+ export interface TagboxProps extends Omit<InputHTMLAttributes<HTMLInputElement>, "size" | "value" | "onChange" | "onPaste"> {
3
3
  size?: "sm" | "md";
4
4
  label?: string;
5
5
  /** 인풋 하단 도움말 텍스트 */
@@ -8,7 +8,12 @@ export interface TagboxProps extends Omit<InputHTMLAttributes<HTMLInputElement>,
8
8
  value?: string[];
9
9
  defaultValue?: string[];
10
10
  onChange?: (tags: string[]) => void;
11
+ /** 붙여넣기 텍스트를 태그 배열로 파싱하는 함수 */
12
+ parsePaste?: (text: string) => string[];
13
+ onPaste?: (e: React.ClipboardEvent<HTMLInputElement>) => void;
14
+ /** 태그 유효성 검사. false 반환 시 인풋이 error 상태로 전환 */
15
+ validate?: (tag: string) => boolean;
11
16
  ref?: Ref<HTMLInputElement>;
12
17
  }
13
- declare function Tagbox({ className, size, label, helperText, error, disabled, value, defaultValue, onChange, placeholder, id, ref, onBlur, onCompositionEnd, onCompositionStart, onFocus, onKeyDown, ...props }: TagboxProps): import("react/jsx-runtime").JSX.Element;
18
+ declare function Tagbox({ className, size, label, helperText, error, disabled, value, defaultValue, onChange, parsePaste, validate, placeholder, id, ref, onBlur, onCompositionEnd, onCompositionStart, onFocus, onKeyDown, onPaste, ...props }: TagboxProps): import("react/jsx-runtime").JSX.Element;
14
19
  export { Tagbox };