@aivex/ui 1.1.0-dev.4 → 1.1.0-dev.5
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/IconButton/IconButton.d.ts +6 -3
- package/dist/components/InputBase/InputBase.d.ts +30 -0
- package/dist/components/InputBase/index.d.ts +1 -0
- package/dist/components/Select/Select.d.ts +9 -9
- package/dist/components/Select/index.d.ts +1 -1
- package/dist/components/Tagbox/Tagbox.d.ts +3 -1
- package/dist/components/Textarea/Textarea.d.ts +15 -9
- package/dist/components/Textarea/index.d.ts +1 -1
- package/dist/components/Textbox/Textbox.d.ts +18 -0
- package/dist/components/Textbox/index.d.ts +2 -0
- package/dist/index.cjs +1 -1
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.ts +2 -1
- package/dist/index.js +1628 -1580
- package/dist/index.js.map +1 -1
- package/dist/styles.css +1 -1
- package/dist/tokens/tokens.css +2 -2
- package/package.json +3 -1
- package/dist/components/Input/Input.d.ts +0 -13
- package/dist/components/Input/index.d.ts +0 -2
|
@@ -1,14 +1,17 @@
|
|
|
1
1
|
import { type VariantProps } from "class-variance-authority";
|
|
2
2
|
import type { ButtonHTMLAttributes, ReactNode, Ref } from "react";
|
|
3
3
|
declare const iconButtonVariants: (props?: ({
|
|
4
|
-
size?: "sm" | "md" | "lg" | null | undefined;
|
|
4
|
+
size?: "sm" | "md" | "lg" | "xs" | null | undefined;
|
|
5
5
|
shape?: "rounded" | "rectangle" | null | undefined;
|
|
6
6
|
} & import("class-variance-authority/types").ClassProp) | undefined) => string;
|
|
7
7
|
export interface IconButtonProps extends Omit<ButtonHTMLAttributes<HTMLButtonElement>, "type">, VariantProps<typeof iconButtonVariants> {
|
|
8
|
-
|
|
8
|
+
/** 아이콘 색상 — primary: 기본(어두운) 배경, white: 어두운 배경 위 */
|
|
9
|
+
color?: "primary" | "white";
|
|
10
|
+
/** true 이면 danger 색상 적용 (color 보다 우선) */
|
|
11
|
+
error?: boolean;
|
|
9
12
|
asChild?: boolean;
|
|
10
13
|
children?: ReactNode;
|
|
11
14
|
ref?: Ref<HTMLButtonElement>;
|
|
12
15
|
}
|
|
13
|
-
declare function IconButton({ className, size, shape,
|
|
16
|
+
declare function IconButton({ className, size, shape, color, error, asChild, children, ref, ...props }: IconButtonProps): import("react/jsx-runtime").JSX.Element;
|
|
14
17
|
export { IconButton, iconButtonVariants };
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import type { ReactNode } from "react";
|
|
2
|
+
declare const inputContainerVariants: (props?: ({
|
|
3
|
+
state?: "default" | "disabled" | "error" | "focused" | null | undefined;
|
|
4
|
+
size?: "sm" | "md" | null | undefined;
|
|
5
|
+
layout?: "wrap" | "inline" | "block" | null | undefined;
|
|
6
|
+
} & import("class-variance-authority/types").ClassProp) | undefined) => string;
|
|
7
|
+
export type InputLayout = "inline" | "block" | "wrap";
|
|
8
|
+
export type InputState = "default" | "focused" | "error" | "disabled";
|
|
9
|
+
export interface InputBaseProps {
|
|
10
|
+
id?: string;
|
|
11
|
+
label?: string;
|
|
12
|
+
/** 인풋 하단 도움말 텍스트. error=true 이면 danger 색상으로 표시 */
|
|
13
|
+
helperText?: string;
|
|
14
|
+
error?: boolean;
|
|
15
|
+
disabled?: boolean;
|
|
16
|
+
focused?: boolean;
|
|
17
|
+
size?: "sm" | "md";
|
|
18
|
+
layout?: InputLayout;
|
|
19
|
+
/** 인풋 컨테이너 왼쪽 슬롯 */
|
|
20
|
+
leadingElement?: ReactNode;
|
|
21
|
+
/** 인풋 컨테이너 오른쪽 슬롯 */
|
|
22
|
+
trailingElement?: ReactNode;
|
|
23
|
+
/** 인풋 컨테이너(border 박스)에 추가할 className */
|
|
24
|
+
containerClassName?: string;
|
|
25
|
+
/** 최외곽 래퍼 div 에 추가할 className */
|
|
26
|
+
className?: string;
|
|
27
|
+
children: ReactNode;
|
|
28
|
+
}
|
|
29
|
+
declare function InputBase({ id, label, helperText, error, disabled, focused, size, layout, leadingElement, trailingElement, containerClassName, className, children, }: InputBaseProps): import("react/jsx-runtime").JSX.Element;
|
|
30
|
+
export { InputBase, inputContainerVariants };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from "./InputBase";
|
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
state?: "default" | "disabled" | "focused" | "error" | null | undefined;
|
|
5
|
-
size?: "sm" | "md" | null | undefined;
|
|
6
|
-
} & import("class-variance-authority/types").ClassProp) | undefined) => string;
|
|
7
|
-
export interface SelectProps extends Omit<SelectHTMLAttributes<HTMLSelectElement>, "size">, Pick<VariantProps<typeof selectWrapperVariants>, "size"> {
|
|
1
|
+
import type { ReactNode, Ref, SelectHTMLAttributes } from "react";
|
|
2
|
+
export interface SelectProps extends Omit<SelectHTMLAttributes<HTMLSelectElement>, "size"> {
|
|
3
|
+
size?: "sm" | "md";
|
|
8
4
|
label?: string;
|
|
5
|
+
/** 인풋 하단 도움말 텍스트 */
|
|
6
|
+
helperText?: string;
|
|
9
7
|
error?: boolean;
|
|
8
|
+
/** 셀렉트 좌측 슬롯 */
|
|
9
|
+
leadingElement?: ReactNode;
|
|
10
10
|
ref?: Ref<HTMLSelectElement>;
|
|
11
11
|
}
|
|
12
|
-
declare function Select({ className, label, error, disabled, size, id, children, ref, onFocus, onBlur, ...props }: SelectProps): import("react/jsx-runtime").JSX.Element;
|
|
13
|
-
export { Select
|
|
12
|
+
declare function Select({ className, label, helperText, error, disabled, size, leadingElement, id, children, ref, onFocus, onBlur, ...props }: SelectProps): import("react/jsx-runtime").JSX.Element;
|
|
13
|
+
export { Select };
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
export type { SelectProps } from "./Select";
|
|
2
|
-
export { Select
|
|
2
|
+
export { Select } from "./Select";
|
|
@@ -2,11 +2,13 @@ import { type InputHTMLAttributes, type Ref } from "react";
|
|
|
2
2
|
export interface TagboxProps extends Omit<InputHTMLAttributes<HTMLInputElement>, "size" | "value" | "onChange"> {
|
|
3
3
|
size?: "sm" | "md";
|
|
4
4
|
label?: string;
|
|
5
|
+
/** 인풋 하단 도움말 텍스트 */
|
|
6
|
+
helperText?: string;
|
|
5
7
|
error?: boolean;
|
|
6
8
|
value?: string[];
|
|
7
9
|
defaultValue?: string[];
|
|
8
10
|
onChange?: (tags: string[]) => void;
|
|
9
11
|
ref?: Ref<HTMLInputElement>;
|
|
10
12
|
}
|
|
11
|
-
declare function Tagbox({ className, size, label, error, disabled, value, defaultValue, onChange, placeholder, id, ref, onBlur, onCompositionEnd, onCompositionStart, onFocus, onKeyDown, ...props }: TagboxProps): import("react/jsx-runtime").JSX.Element;
|
|
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;
|
|
12
14
|
export { Tagbox };
|
|
@@ -1,13 +1,19 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
state?: "default" | "disabled" | "focused" | "error" | null | undefined;
|
|
5
|
-
size?: "sm" | "md" | null | undefined;
|
|
6
|
-
} & import("class-variance-authority/types").ClassProp) | undefined) => string;
|
|
7
|
-
export interface TextareaProps extends Omit<TextareaHTMLAttributes<HTMLTextAreaElement>, "size">, Pick<VariantProps<typeof textareaWrapperVariants>, "size"> {
|
|
1
|
+
import type { ReactNode, Ref, TextareaHTMLAttributes } from "react";
|
|
2
|
+
export interface TextareaProps extends Omit<TextareaHTMLAttributes<HTMLTextAreaElement>, "size"> {
|
|
3
|
+
size?: "sm" | "md";
|
|
8
4
|
label?: string;
|
|
5
|
+
/** 인풋 하단 도움말 텍스트 */
|
|
6
|
+
helperText?: string;
|
|
9
7
|
error?: boolean;
|
|
8
|
+
/** 초기 최소 높이 (CSS 값. 예: "120px", "8rem") */
|
|
9
|
+
minHeight?: string | number;
|
|
10
|
+
/** true 이면 높이를 고정하여 resize 비활성화 */
|
|
11
|
+
fixedHeight?: boolean;
|
|
12
|
+
/** Textarea 좌측 슬롯 */
|
|
13
|
+
leadingElement?: ReactNode;
|
|
14
|
+
/** Textarea 우측 슬롯 */
|
|
15
|
+
trailingElement?: ReactNode;
|
|
10
16
|
ref?: Ref<HTMLTextAreaElement>;
|
|
11
17
|
}
|
|
12
|
-
declare function Textarea({ className, label, error, disabled, size, id, ref, onFocus, onBlur, ...props }: TextareaProps): import("react/jsx-runtime").JSX.Element;
|
|
13
|
-
export { Textarea
|
|
18
|
+
declare function Textarea({ className, label, helperText, error, disabled, size, minHeight, fixedHeight, leadingElement, trailingElement, id, ref, onFocus, onBlur, ...props }: TextareaProps): import("react/jsx-runtime").JSX.Element;
|
|
19
|
+
export { Textarea };
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
export type { TextareaProps } from "./Textarea";
|
|
2
|
-
export { Textarea
|
|
2
|
+
export { Textarea } from "./Textarea";
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import type { InputHTMLAttributes, ReactNode, Ref } from "react";
|
|
2
|
+
import { inputContainerVariants } from "@/components/InputBase";
|
|
3
|
+
export interface TextboxProps extends Omit<InputHTMLAttributes<HTMLInputElement>, "size"> {
|
|
4
|
+
size?: "sm" | "md";
|
|
5
|
+
label?: string;
|
|
6
|
+
/** 인풋 하단 도움말 텍스트 */
|
|
7
|
+
helperText?: string;
|
|
8
|
+
error?: boolean;
|
|
9
|
+
/** 입력값 전체 삭제 버튼 표시 여부 */
|
|
10
|
+
clearable?: boolean;
|
|
11
|
+
/** 인풋 좌측 슬롯 */
|
|
12
|
+
leadingElement?: ReactNode;
|
|
13
|
+
/** 인풋 우측 슬롯 (clearable=true 이고 값이 있으면 삭제 버튼이 추가됨) */
|
|
14
|
+
trailingElement?: ReactNode;
|
|
15
|
+
ref?: Ref<HTMLInputElement>;
|
|
16
|
+
}
|
|
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;
|
|
18
|
+
export { inputContainerVariants as inputWrapperVariants, Textbox };
|