@aivex/ui 1.2.0-dev.7 → 1.2.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,4 +1,4 @@
1
- import { type ReactNode } from "react";
1
+ import { type AriaAttributes, type ReactNode } from "react";
2
2
  export interface DateRange {
3
3
  start: Date;
4
4
  end: Date;
@@ -35,10 +35,12 @@ interface DatePickerBaseProps {
35
35
  /** 인풋 크기 */
36
36
  size?: "sm" | "md";
37
37
  placeholder?: string;
38
- label?: string;
39
- helperText?: string;
40
38
  error?: boolean;
41
39
  disabled?: boolean;
40
+ /** Field(FieldControl)가 주입하는 id — FieldLabel(htmlFor) 연결용 */
41
+ id?: string;
42
+ "aria-describedby"?: string;
43
+ "aria-invalid"?: AriaAttributes["aria-invalid"];
42
44
  /** 점 표시할 일자 목록 (예: 데이터가 있는 날) */
43
45
  markedDates?: Date[];
44
46
  minDate?: Date;
@@ -7,10 +7,6 @@ declare const inputContainerVariants: (props?: ({
7
7
  export type InputLayout = "inline" | "block" | "wrap";
8
8
  export type InputState = "default" | "focused" | "error" | "disabled" | "filled";
9
9
  export interface InputBaseProps {
10
- id?: string;
11
- label?: string;
12
- /** 인풋 하단 도움말 텍스트. error=true 이면 danger 색상으로 표시 */
13
- helperText?: string;
14
10
  error?: boolean;
15
11
  disabled?: boolean;
16
12
  focused?: boolean;
@@ -22,10 +18,12 @@ export interface InputBaseProps {
22
18
  /** 인풋 컨테이너 오른쪽 슬롯 */
23
19
  endContent?: ReactNode;
24
20
  /** 인풋 컨테이너(border 박스)에 추가할 className */
25
- containerClassName?: string;
26
- /** 최외곽 래퍼 div 에 추가할 className */
27
21
  className?: string;
28
22
  children: ReactNode;
29
23
  }
30
- declare function InputBase({ id, label, helperText, error, disabled, focused, filled, size, layout, startContent, endContent, containerClassName, className, children, }: InputBaseProps): import("react/jsx-runtime").JSX.Element;
24
+ /**
25
+ * 인풋 컨테이너(border 박스) 프리미티브. 라벨/설명/에러는
26
+ * Field(FieldLabel/FieldDescription/FieldError) 합성으로 조합한다.
27
+ */
28
+ declare function InputBase({ error, disabled, focused, filled, size, layout, startContent, endContent, className, children, }: InputBaseProps): import("react/jsx-runtime").JSX.Element;
31
29
  export { InputBase, inputContainerVariants };
@@ -1,13 +1,19 @@
1
1
  import { type ReactNode, type Ref } from "react";
2
2
  import { type ButtonProps } from "@/components/Button";
3
+ import type { IconButtonProps } from "@/components/IconButton";
3
4
  type ModalOpenAutoFocusHandler = (event: Event) => void;
4
5
  export type ModalSize = "sm" | "md" | "lg" | "xl" | "full";
6
+ export interface ModalHeadingButtonProps extends Omit<IconButtonProps, "asChild" | "children" | "className" | "ref" | "shape" | "size"> {
7
+ "aria-label": string;
8
+ children: ReactNode;
9
+ }
5
10
  export interface ModalButtonProps extends Omit<ButtonProps, "asChild" | "children" | "className" | "color" | "ref" | "size" | "style" | "variant"> {
6
11
  children: ReactNode;
7
12
  }
8
13
  export interface ModalSurfaceProps {
9
14
  title: ReactNode;
10
15
  description?: ReactNode;
16
+ headingButton?: ModalHeadingButtonProps;
11
17
  children?: ReactNode;
12
18
  tertiaryButton?: ModalButtonProps;
13
19
  secondaryButton?: ModalButtonProps;
@@ -17,13 +23,14 @@ export interface ModalSurfaceProps {
17
23
  closeAriaLabel?: string;
18
24
  ref?: Ref<HTMLDivElement>;
19
25
  }
20
- declare function ModalSurface({ title, description, children, tertiaryButton, secondaryButton, primaryButton, size, onClose, closeAriaLabel, ref, }: ModalSurfaceProps): import("react/jsx-runtime").JSX.Element;
26
+ declare function ModalSurface({ title, description, headingButton, children, tertiaryButton, secondaryButton, primaryButton, size, onClose, closeAriaLabel, ref, }: ModalSurfaceProps): import("react/jsx-runtime").JSX.Element;
21
27
  export interface ModalProps {
22
28
  open?: boolean;
23
29
  defaultOpen?: boolean;
24
30
  onOpenChange?: (open: boolean) => void;
25
31
  title: ReactNode;
26
32
  description?: ReactNode;
33
+ headingButton?: ModalHeadingButtonProps;
27
34
  children?: ReactNode;
28
35
  tertiaryButton?: ModalButtonProps;
29
36
  secondaryButton?: ModalButtonProps;
@@ -33,5 +40,5 @@ export interface ModalProps {
33
40
  onOpenAutoFocus?: ModalOpenAutoFocusHandler;
34
41
  closeAriaLabel?: string;
35
42
  }
36
- declare function Modal({ open, defaultOpen, onOpenChange, title, description, children, tertiaryButton, secondaryButton, primaryButton, size, closeOnInteractOutside, onOpenAutoFocus, closeAriaLabel, }: ModalProps): import("react/jsx-runtime").JSX.Element;
43
+ declare function Modal({ open, defaultOpen, onOpenChange, title, description, headingButton, children, tertiaryButton, secondaryButton, primaryButton, size, closeOnInteractOutside, onOpenAutoFocus, closeAriaLabel, }: ModalProps): import("react/jsx-runtime").JSX.Element;
37
44
  export { Modal, ModalSurface };
@@ -1,2 +1,2 @@
1
- export type { ModalButtonProps, ModalProps, ModalSize, ModalSurfaceProps } from "./Modal";
1
+ export type { ModalButtonProps, ModalHeadingButtonProps, ModalProps, ModalSize, ModalSurfaceProps, } from "./Modal";
2
2
  export { Modal, ModalSurface } from "./Modal";
@@ -1,3 +1,4 @@
1
+ import { type AriaAttributes } from "react";
1
2
  export interface SelectBoxOption {
2
3
  value: string;
3
4
  label: string;
@@ -26,11 +27,13 @@ export interface SelectBoxProps {
26
27
  * @example renderValue={(option, group) => `${group.title} / ${option.label}`}
27
28
  */
28
29
  renderValue?: (option: SelectBoxOption, group: SelectBoxGroup) => string;
29
- /** 최외곽 래퍼에 추가할 className */
30
+ /** 트리거 버튼에 추가할 className */
30
31
  className?: string;
31
- label?: string;
32
- helperText?: string;
33
32
  error?: boolean;
33
+ /** Field(FieldControl)가 주입하는 id — FieldLabel(htmlFor) 연결용 */
34
+ id?: string;
35
+ "aria-describedby"?: string;
36
+ "aria-invalid"?: AriaAttributes["aria-invalid"];
34
37
  }
35
- declare function SelectBox({ groups, value, placeholder, disabled, size, onChange, renderValue, className, label, helperText, error, }: SelectBoxProps): import("react/jsx-runtime").JSX.Element;
38
+ declare function SelectBox({ groups, value, placeholder, disabled, size, onChange, renderValue, className, error, id, "aria-describedby": ariaDescribedby, "aria-invalid": ariaInvalid, }: SelectBoxProps): import("react/jsx-runtime").JSX.Element;
36
39
  export { SelectBox };
@@ -1,9 +1,6 @@
1
1
  import { type InputHTMLAttributes, type ReactNode, type Ref } from "react";
2
2
  export interface TagboxProps extends Omit<InputHTMLAttributes<HTMLInputElement>, "size" | "value" | "onChange" | "onPaste"> {
3
3
  size?: "sm" | "md";
4
- label?: string;
5
- /** 인풋 하단 도움말 텍스트 */
6
- helperText?: string;
7
4
  error?: boolean;
8
5
  value?: string[];
9
6
  defaultValue?: string[];
@@ -21,5 +18,5 @@ export interface TagboxProps extends Omit<InputHTMLAttributes<HTMLInputElement>,
21
18
  }) => ReactNode;
22
19
  ref?: Ref<HTMLInputElement>;
23
20
  }
24
- declare function Tagbox({ className, size, label, helperText, error, disabled, readOnly, value, defaultValue, onChange, parsePaste, validate, renderTag, placeholder, id, ref, onBlur, onCompositionEnd, onCompositionStart, onFocus, onKeyDown, onPaste, ...props }: TagboxProps): import("react/jsx-runtime").JSX.Element;
21
+ declare function Tagbox({ className, size, error, disabled, readOnly, value, defaultValue, onChange, parsePaste, validate, renderTag, placeholder, id, ref, onBlur, onCompositionEnd, onCompositionStart, onFocus, onKeyDown, onPaste, ...props }: TagboxProps): import("react/jsx-runtime").JSX.Element;
25
22
  export { Tagbox };
@@ -1,9 +1,12 @@
1
1
  import type { ReactNode, Ref, TextareaHTMLAttributes } from "react";
2
2
  export interface TextareaProps extends Omit<TextareaHTMLAttributes<HTMLTextAreaElement>, "size"> {
3
3
  size?: "sm" | "md";
4
- label?: string;
5
- /** 인풋 하단 도움말 텍스트 */
6
- helperText?: string;
4
+ /**
5
+ * 글자수 카운터용 소프트 리밋. 값이 있으면 인풋 우하단(텍스트 아래)에 `현재 / 최대` 카운터를
6
+ * 표시하고, 초과해도 입력을 막지 않고 에러로 경고만 한다.
7
+ * (카운터/디자인 없이 입력만 하드컷하려면 네이티브 maxLength 를 그대로 사용하면 된다.)
8
+ */
9
+ maxCount?: number;
7
10
  error?: boolean;
8
11
  /** 초기 최소 높이 (CSS 값. 예: "120px", "8rem") */
9
12
  minHeight?: string | number;
@@ -15,5 +18,5 @@ export interface TextareaProps extends Omit<TextareaHTMLAttributes<HTMLTextAreaE
15
18
  endContent?: ReactNode;
16
19
  ref?: Ref<HTMLTextAreaElement>;
17
20
  }
18
- declare function Textarea({ className, label, helperText, error, disabled, size, minHeight, fixedHeight, startContent, endContent, id, ref, onFocus, onBlur, maxLength, value, defaultValue, onChange, ...props }: TextareaProps): import("react/jsx-runtime").JSX.Element;
21
+ declare function Textarea({ className, error, disabled, size, minHeight, fixedHeight, startContent, endContent, id, ref, onFocus, onBlur, maxCount, value, defaultValue, onChange, ...props }: TextareaProps): import("react/jsx-runtime").JSX.Element;
19
22
  export { Textarea };
@@ -2,10 +2,6 @@ import type { InputHTMLAttributes, ReactNode, Ref } from "react";
2
2
  import { inputContainerVariants } from "@/components/InputBase";
3
3
  export interface TextboxProps extends Omit<InputHTMLAttributes<HTMLInputElement>, "size"> {
4
4
  size?: "sm" | "md";
5
- /** @deprecated <Field><FieldLabel>…</FieldLabel><FieldControl><Textbox/></FieldControl></Field> 를 사용하세요. */
6
- label?: string;
7
- /** @deprecated Field 의 <FieldDescription> / <FieldError> 를 사용하세요. */
8
- helperText?: string;
9
5
  error?: boolean;
10
6
  /** 입력값 전체 삭제 버튼 표시 여부 */
11
7
  clearable?: boolean;
@@ -15,5 +11,5 @@ export interface TextboxProps extends Omit<InputHTMLAttributes<HTMLInputElement>
15
11
  endContent?: ReactNode;
16
12
  ref?: Ref<HTMLInputElement>;
17
13
  }
18
- declare function Textbox({ className, label, helperText, error, disabled, clearable, startContent, endContent, size, id, ref, value, defaultValue, onChange, onFocus, onBlur, ...props }: TextboxProps): import("react/jsx-runtime").JSX.Element;
14
+ declare function Textbox({ className, error, disabled, clearable, startContent, endContent, size, id, ref, value, defaultValue, onChange, onFocus, onBlur, ...props }: TextboxProps): import("react/jsx-runtime").JSX.Element;
19
15
  export { inputContainerVariants as inputWrapperVariants, Textbox };