@aivex/ui 1.1.0-dev.2 → 1.1.0-dev.20
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/BreadCrumb/BreadCrumb.d.ts +18 -12
- package/dist/components/BreadCrumb/index.d.ts +2 -2
- package/dist/components/Button/Button.d.ts +4 -5
- package/dist/components/Checkbox/Checkbox.d.ts +1 -1
- package/dist/components/Checkbox/ChipsCheckbox.d.ts +7 -0
- package/dist/components/Checkbox/index.d.ts +2 -0
- 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/Menu/Menu.d.ts +79 -13
- package/dist/components/Menu/index.d.ts +2 -2
- package/dist/components/Nav/Nav.d.ts +3 -5
- package/dist/components/Pagination/Pagination.d.ts +20 -6
- package/dist/components/Radio/Radio.d.ts +1 -1
- package/dist/components/Segmented/Segmented.d.ts +11 -17
- package/dist/components/SelectBox/SelectBox.d.ts +34 -0
- package/dist/components/SelectBox/index.d.ts +2 -0
- package/dist/components/Shortcut/Shortcut.d.ts +3 -2
- package/dist/components/Tab/Tab.d.ts +17 -16
- package/dist/components/Tab/index.d.ts +2 -2
- package/dist/components/Tagbox/Tagbox.d.ts +9 -2
- 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 +41 -1
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.ts +4 -2
- package/dist/index.js +6065 -2007
- package/dist/index.js.map +1 -1
- package/dist/styles.css +1 -1
- package/dist/tokens/tokens.css +80 -15
- package/package.json +7 -1
- package/dist/components/Input/Input.d.ts +0 -13
- package/dist/components/Input/index.d.ts +0 -2
- package/dist/components/Select/Select.d.ts +0 -13
- package/dist/components/Select/index.d.ts +0 -2
|
@@ -1,19 +1,25 @@
|
|
|
1
|
-
import type {
|
|
2
|
-
export interface BreadCrumbItemProps extends AnchorHTMLAttributes<HTMLAnchorElement> {
|
|
3
|
-
label: string;
|
|
4
|
-
href?: string;
|
|
5
|
-
current?: boolean;
|
|
6
|
-
ref?: Ref<HTMLAnchorElement>;
|
|
7
|
-
}
|
|
8
|
-
declare function BreadCrumbItem({ className, label, href, current, ref, ...props }: BreadCrumbItemProps): import("react/jsx-runtime").JSX.Element;
|
|
1
|
+
import type { ElementType, HTMLAttributes, ReactNode, Ref } from "react";
|
|
9
2
|
export interface BreadCrumbItemDef {
|
|
10
|
-
label:
|
|
3
|
+
label: ReactNode;
|
|
4
|
+
/**
|
|
5
|
+
* 렌더링할 컴포넌트를 직접 지정합니다.
|
|
6
|
+
* 예: Next.js `Link`, React Router `NavLink` 등
|
|
7
|
+
* 지정하지 않으면 href 유무에 따라 <a> 또는 <button>으로 자동 선택됩니다.
|
|
8
|
+
*/
|
|
9
|
+
as?: ElementType;
|
|
10
|
+
/** 있으면 <a href> 로 렌더링 (시맨틱 / 새 탭 열기 지원) */
|
|
11
11
|
href?: string;
|
|
12
|
-
|
|
12
|
+
/** 클릭 핸들러 (SPA 라우팅 등) */
|
|
13
|
+
onClick?: () => void;
|
|
13
14
|
}
|
|
14
15
|
export interface BreadCrumbProps extends HTMLAttributes<HTMLElement> {
|
|
15
16
|
items: BreadCrumbItemDef[];
|
|
17
|
+
/**
|
|
18
|
+
* 이 값을 초과하면 중간 항목을 ··· 으로 축소합니다.
|
|
19
|
+
* 예: maxItems=3이고 항목이 5개면 → 첫번째 / ··· / 마지막
|
|
20
|
+
*/
|
|
21
|
+
maxItems?: number;
|
|
16
22
|
ref?: Ref<HTMLElement>;
|
|
17
23
|
}
|
|
18
|
-
declare function BreadCrumb({ className, items, ref, ...props }: BreadCrumbProps): import("react/jsx-runtime").JSX.Element;
|
|
19
|
-
export { BreadCrumb
|
|
24
|
+
declare function BreadCrumb({ className, items, maxItems, ref, ...props }: BreadCrumbProps): import("react/jsx-runtime").JSX.Element;
|
|
25
|
+
export { BreadCrumb };
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export type { BreadCrumbItemDef,
|
|
2
|
-
export { BreadCrumb
|
|
1
|
+
export type { BreadCrumbItemDef, BreadCrumbProps } from "./BreadCrumb";
|
|
2
|
+
export { BreadCrumb } from "./BreadCrumb";
|
|
@@ -3,17 +3,16 @@ import type { ButtonHTMLAttributes, ReactNode, Ref } from "react";
|
|
|
3
3
|
declare const buttonVariantStyles: (props?: ({
|
|
4
4
|
variant?: "solid" | "outline" | "ghost" | null | undefined;
|
|
5
5
|
color?: "danger" | "primary" | "secondary" | null | undefined;
|
|
6
|
-
size?: "sm" | "md" | "lg" | null | undefined;
|
|
6
|
+
size?: "sm" | "md" | "lg" | "icon-sm" | "icon-md" | "icon-lg" | null | undefined;
|
|
7
7
|
} & import("class-variance-authority/types").ClassProp) | undefined) => string;
|
|
8
8
|
type ButtonVariantProps = VariantProps<typeof buttonVariantStyles>;
|
|
9
9
|
declare function buttonVariants({ variant, color, size, className, }?: ButtonVariantProps & {
|
|
10
10
|
className?: string;
|
|
11
11
|
}): string;
|
|
12
|
-
export interface ButtonProps extends Omit<ButtonHTMLAttributes<HTMLButtonElement>, "color"
|
|
12
|
+
export interface ButtonProps extends Omit<ButtonHTMLAttributes<HTMLButtonElement>, "color">, ButtonVariantProps {
|
|
13
13
|
asChild?: boolean;
|
|
14
|
-
|
|
15
|
-
suffix?: ReactNode;
|
|
14
|
+
children?: ReactNode;
|
|
16
15
|
ref?: Ref<HTMLButtonElement>;
|
|
17
16
|
}
|
|
18
|
-
declare function Button({ className, variant, color, size, asChild, ref,
|
|
17
|
+
declare function Button({ className, variant, color, size, asChild, ref, children, ...props }: ButtonProps): import("react/jsx-runtime").JSX.Element;
|
|
19
18
|
export { Button, buttonVariants };
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { type VariantProps } from "class-variance-authority";
|
|
2
2
|
import { type InputHTMLAttributes, type Ref } from "react";
|
|
3
3
|
declare const checkboxVariants: (props?: ({
|
|
4
|
-
size?: "sm" | "md" |
|
|
4
|
+
size?: "sm" | "md" | null | undefined;
|
|
5
5
|
} & import("class-variance-authority/types").ClassProp) | undefined) => string;
|
|
6
6
|
export interface CheckboxProps extends Omit<InputHTMLAttributes<HTMLInputElement>, "size" | "type">, VariantProps<typeof checkboxVariants> {
|
|
7
7
|
label?: string;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import React, { type InputHTMLAttributes, type Ref } from "react";
|
|
2
|
+
export interface ChipsCheckboxProps extends Omit<InputHTMLAttributes<HTMLInputElement>, "type" | "onClick"> {
|
|
3
|
+
ref?: Ref<HTMLInputElement>;
|
|
4
|
+
onClick?: React.MouseEventHandler<HTMLLabelElement>;
|
|
5
|
+
}
|
|
6
|
+
declare function ChipsCheckbox({ className, disabled, checked, defaultChecked, onChange, onClick, id, ref, ...props }: ChipsCheckboxProps): import("react/jsx-runtime").JSX.Element;
|
|
7
|
+
export { ChipsCheckbox };
|
|
@@ -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,18 +1,84 @@
|
|
|
1
|
-
import
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
1
|
+
import * as DropdownMenu from "@radix-ui/react-dropdown-menu";
|
|
2
|
+
import type { ComponentPropsWithoutRef, ReactNode, Ref } from "react";
|
|
3
|
+
type MenuRootProps = ComponentPropsWithoutRef<typeof DropdownMenu.Root>;
|
|
4
|
+
declare function MenuRoot(props: MenuRootProps): import("react/jsx-runtime").JSX.Element;
|
|
5
|
+
type MenuTriggerProps = ComponentPropsWithoutRef<typeof DropdownMenu.Trigger> & {
|
|
6
|
+
ref?: Ref<HTMLButtonElement>;
|
|
7
|
+
};
|
|
8
|
+
declare function MenuTrigger({ ref, ...props }: MenuTriggerProps): import("react/jsx-runtime").JSX.Element;
|
|
9
|
+
type MenuContentProps = ComponentPropsWithoutRef<typeof DropdownMenu.Content> & {
|
|
10
|
+
ref?: Ref<HTMLDivElement>;
|
|
11
|
+
};
|
|
12
|
+
declare function MenuContent({ className, sideOffset, ref, ...props }: MenuContentProps): import("react/jsx-runtime").JSX.Element;
|
|
13
|
+
type MenuGroupProps = ComponentPropsWithoutRef<typeof DropdownMenu.Group> & {
|
|
14
|
+
ref?: Ref<HTMLDivElement>;
|
|
15
|
+
};
|
|
16
|
+
declare function MenuGroup({ className, ref, ...props }: MenuGroupProps): import("react/jsx-runtime").JSX.Element;
|
|
17
|
+
type MenuSeparatorProps = ComponentPropsWithoutRef<typeof DropdownMenu.Separator> & {
|
|
18
|
+
ref?: Ref<HTMLDivElement>;
|
|
19
|
+
};
|
|
20
|
+
declare function MenuSeparator({ className, ref, ...props }: MenuSeparatorProps): import("react/jsx-runtime").JSX.Element;
|
|
21
|
+
type MenuLabelProps = ComponentPropsWithoutRef<typeof DropdownMenu.Label> & {
|
|
22
|
+
ref?: Ref<HTMLDivElement>;
|
|
23
|
+
};
|
|
24
|
+
declare function MenuLabel({ className, ref, ...props }: MenuLabelProps): import("react/jsx-runtime").JSX.Element;
|
|
25
|
+
interface MenuItemProps extends Omit<ComponentPropsWithoutRef<typeof DropdownMenu.Item>, "children"> {
|
|
26
|
+
/** label/icon으로 렌더할 때 사용. asChild 모드에선 무시 */
|
|
27
|
+
label?: ReactNode;
|
|
8
28
|
icon?: ReactNode;
|
|
9
29
|
danger?: boolean;
|
|
10
|
-
|
|
11
|
-
|
|
30
|
+
/** Radix asChild — 자식 컴포넌트(Link 등)에 메뉴 동작/스타일 위임 */
|
|
31
|
+
asChild?: boolean;
|
|
32
|
+
children?: ReactNode;
|
|
33
|
+
ref?: Ref<HTMLDivElement>;
|
|
34
|
+
}
|
|
35
|
+
declare function MenuItem({ className, label, icon, danger, asChild, children, ref, ...props }: MenuItemProps): import("react/jsx-runtime").JSX.Element;
|
|
36
|
+
interface MenuCheckboxItemProps extends ComponentPropsWithoutRef<typeof DropdownMenu.CheckboxItem> {
|
|
37
|
+
label?: ReactNode;
|
|
38
|
+
icon?: ReactNode;
|
|
39
|
+
ref?: Ref<HTMLDivElement>;
|
|
40
|
+
}
|
|
41
|
+
declare function MenuCheckboxItem({ className, label, icon, children, ref, ...props }: MenuCheckboxItemProps): import("react/jsx-runtime").JSX.Element;
|
|
42
|
+
type MenuRadioGroupProps = ComponentPropsWithoutRef<typeof DropdownMenu.RadioGroup> & {
|
|
43
|
+
ref?: Ref<HTMLDivElement>;
|
|
44
|
+
};
|
|
45
|
+
declare function MenuRadioGroup({ className, ref, ...props }: MenuRadioGroupProps): import("react/jsx-runtime").JSX.Element;
|
|
46
|
+
interface MenuRadioItemProps extends ComponentPropsWithoutRef<typeof DropdownMenu.RadioItem> {
|
|
47
|
+
label?: ReactNode;
|
|
48
|
+
icon?: ReactNode;
|
|
49
|
+
ref?: Ref<HTMLDivElement>;
|
|
12
50
|
}
|
|
13
|
-
declare function
|
|
14
|
-
|
|
51
|
+
declare function MenuRadioItem({ className, label, icon, children, ref, ...props }: MenuRadioItemProps): import("react/jsx-runtime").JSX.Element;
|
|
52
|
+
type MenuShortcutProps = ComponentPropsWithoutRef<"span"> & {
|
|
53
|
+
ref?: Ref<HTMLSpanElement>;
|
|
54
|
+
};
|
|
55
|
+
declare function MenuShortcut({ className, ref, ...props }: MenuShortcutProps): import("react/jsx-runtime").JSX.Element;
|
|
56
|
+
type MenuSubProps = ComponentPropsWithoutRef<typeof DropdownMenu.Sub>;
|
|
57
|
+
declare function MenuSub(props: MenuSubProps): import("react/jsx-runtime").JSX.Element;
|
|
58
|
+
interface MenuSubTriggerProps extends ComponentPropsWithoutRef<typeof DropdownMenu.SubTrigger> {
|
|
59
|
+
label?: ReactNode;
|
|
60
|
+
icon?: ReactNode;
|
|
15
61
|
ref?: Ref<HTMLDivElement>;
|
|
16
62
|
}
|
|
17
|
-
declare function
|
|
18
|
-
|
|
63
|
+
declare function MenuSubTrigger({ className, label, icon, children, ref, ...props }: MenuSubTriggerProps): import("react/jsx-runtime").JSX.Element;
|
|
64
|
+
type MenuSubContentProps = ComponentPropsWithoutRef<typeof DropdownMenu.SubContent> & {
|
|
65
|
+
ref?: Ref<HTMLDivElement>;
|
|
66
|
+
};
|
|
67
|
+
declare function MenuSubContent({ className, sideOffset, ref, ...props }: MenuSubContentProps): import("react/jsx-runtime").JSX.Element;
|
|
68
|
+
declare const Menu: typeof MenuRoot & {
|
|
69
|
+
Trigger: typeof MenuTrigger;
|
|
70
|
+
Content: typeof MenuContent;
|
|
71
|
+
Item: typeof MenuItem;
|
|
72
|
+
Group: typeof MenuGroup;
|
|
73
|
+
Separator: typeof MenuSeparator;
|
|
74
|
+
Label: typeof MenuLabel;
|
|
75
|
+
CheckboxItem: typeof MenuCheckboxItem;
|
|
76
|
+
RadioGroup: typeof MenuRadioGroup;
|
|
77
|
+
RadioItem: typeof MenuRadioItem;
|
|
78
|
+
Sub: typeof MenuSub;
|
|
79
|
+
SubTrigger: typeof MenuSubTrigger;
|
|
80
|
+
SubContent: typeof MenuSubContent;
|
|
81
|
+
Shortcut: typeof MenuShortcut;
|
|
82
|
+
};
|
|
83
|
+
export type { MenuCheckboxItemProps, MenuContentProps, MenuGroupProps, MenuItemProps, MenuLabelProps, MenuRadioGroupProps, MenuRadioItemProps, MenuRootProps, MenuSeparatorProps, MenuShortcutProps, MenuSubContentProps, MenuSubProps, MenuSubTriggerProps, MenuTriggerProps, };
|
|
84
|
+
export { Menu };
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export type { MenuItemProps, MenuRootProps } from "./Menu";
|
|
2
|
-
export {
|
|
1
|
+
export type { MenuCheckboxItemProps, MenuContentProps, MenuGroupProps, MenuItemProps, MenuLabelProps, MenuRadioGroupProps, MenuRadioItemProps, MenuRootProps, MenuSeparatorProps, MenuShortcutProps, MenuSubContentProps, MenuSubProps, MenuSubTriggerProps, MenuTriggerProps, } from "./Menu";
|
|
2
|
+
export { Menu } from "./Menu";
|
|
@@ -5,19 +5,17 @@ declare const navTileVariants: (props?: ({
|
|
|
5
5
|
} & import("class-variance-authority/types").ClassProp) | undefined) => string;
|
|
6
6
|
export interface NavTileProps extends ButtonHTMLAttributes<HTMLButtonElement>, VariantProps<typeof navTileVariants> {
|
|
7
7
|
icon?: ReactNode;
|
|
8
|
-
label?: string;
|
|
9
8
|
ref?: Ref<HTMLButtonElement>;
|
|
10
9
|
}
|
|
11
|
-
declare function NavTile({ className, active, icon,
|
|
10
|
+
declare function NavTile({ className, active, icon, children, ref, ...props }: NavTileProps): import("react/jsx-runtime").JSX.Element;
|
|
12
11
|
declare const navItemVariants: (props?: ({
|
|
13
|
-
|
|
12
|
+
active?: boolean | null | undefined;
|
|
14
13
|
} & import("class-variance-authority/types").ClassProp) | undefined) => string;
|
|
15
14
|
export interface NavItemProps extends ButtonHTMLAttributes<HTMLButtonElement>, VariantProps<typeof navItemVariants> {
|
|
16
15
|
icon?: ReactNode;
|
|
17
|
-
label?: string;
|
|
18
16
|
ref?: Ref<HTMLButtonElement>;
|
|
19
17
|
}
|
|
20
|
-
declare function NavItem({ className,
|
|
18
|
+
declare function NavItem({ className, active, icon, children, ref, ...props }: NavItemProps): import("react/jsx-runtime").JSX.Element;
|
|
21
19
|
export interface NavProps extends HTMLAttributes<HTMLElement> {
|
|
22
20
|
ref?: Ref<HTMLElement>;
|
|
23
21
|
}
|
|
@@ -1,11 +1,25 @@
|
|
|
1
1
|
import { type HTMLAttributes, type Ref } from "react";
|
|
2
2
|
export interface PaginationProps extends Omit<HTMLAttributes<HTMLElement>, "onChange"> {
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
3
|
+
/**
|
|
4
|
+
* undefined면 컴포넌트를 렌더하지 않음 (최초 로드 시).
|
|
5
|
+
* 한 번 정의된 후 다시 undefined가 되면 직전 값을 유지해서 깜빡임 방지.
|
|
6
|
+
*/
|
|
7
|
+
totalPages?: number;
|
|
8
|
+
page: number;
|
|
9
|
+
pageSize: number;
|
|
10
|
+
/** 명시적으로 모든 상호작용 비활성화 (refetch 중, 권한 없음 등) */
|
|
11
|
+
disabled?: boolean;
|
|
12
|
+
/**
|
|
13
|
+
* 페이지 사이즈 셀렉터 옵션. 생략하면 셀렉터가 숨겨짐.
|
|
14
|
+
* @example [{ value: 10, label: "10 each" }, { value: 50, label: "50 each" }]
|
|
15
|
+
*/
|
|
16
|
+
pageSizeOptions?: Array<{
|
|
17
|
+
value: number;
|
|
18
|
+
label: string;
|
|
19
|
+
}>;
|
|
20
|
+
onChange: (page: number) => void;
|
|
21
|
+
onPageSizeChange?: (pageSize: number) => void;
|
|
8
22
|
ref?: Ref<HTMLElement>;
|
|
9
23
|
}
|
|
10
|
-
declare function Pagination({ className,
|
|
24
|
+
declare function Pagination({ className, totalPages, page, pageSize, disabled, pageSizeOptions, onChange, onPageSizeChange, ref, ...props }: PaginationProps): import("react/jsx-runtime").JSX.Element | null;
|
|
11
25
|
export { Pagination };
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { type VariantProps } from "class-variance-authority";
|
|
2
2
|
import type { InputHTMLAttributes, Ref } from "react";
|
|
3
3
|
declare const radioVariants: (props?: ({
|
|
4
|
-
size?: "sm" | "md" |
|
|
4
|
+
size?: "sm" | "md" | null | undefined;
|
|
5
5
|
} & import("class-variance-authority/types").ClassProp) | undefined) => string;
|
|
6
6
|
export interface RadioProps extends Omit<InputHTMLAttributes<HTMLInputElement>, "size" | "type">, VariantProps<typeof radioVariants> {
|
|
7
7
|
label?: string;
|
|
@@ -1,21 +1,15 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { type
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
defaultValue?: string;
|
|
9
|
-
onChange?: (value: string) => void;
|
|
10
|
-
iconOnly?: boolean;
|
|
1
|
+
import type { ToggleGroupItemProps, ToggleGroupSingleProps } from "@radix-ui/react-toggle-group";
|
|
2
|
+
import { type ReactNode, type RefAttributes } from "react";
|
|
3
|
+
type SegmentedSize = "sm" | "md" | "lg" | "icon-sm" | "icon-md" | "icon-lg";
|
|
4
|
+
export interface SegmentedRootProps extends Omit<ToggleGroupSingleProps, "onValueChange" | "type">, RefAttributes<HTMLDivElement> {
|
|
5
|
+
size?: SegmentedSize;
|
|
6
|
+
onValueChange?: (value: string) => void;
|
|
7
|
+
fullWidth?: boolean;
|
|
11
8
|
children?: ReactNode;
|
|
12
|
-
ref?: Ref<HTMLDivElement>;
|
|
13
9
|
}
|
|
14
|
-
declare function SegmentedRoot({ className, size, value, defaultValue,
|
|
15
|
-
export
|
|
16
|
-
value: string;
|
|
10
|
+
declare function SegmentedRoot({ className, size, value, defaultValue, onValueChange, fullWidth, children, ref, ...props }: SegmentedRootProps): import("react/jsx-runtime").JSX.Element;
|
|
11
|
+
export type SegmentedItemProps = ToggleGroupItemProps & RefAttributes<HTMLButtonElement> & {
|
|
17
12
|
children?: ReactNode;
|
|
18
|
-
|
|
19
|
-
}
|
|
20
|
-
declare function SegmentedItem({ className, value, children, onClick, ref, ...props }: SegmentedItemProps): import("react/jsx-runtime").JSX.Element;
|
|
13
|
+
};
|
|
14
|
+
declare function SegmentedItem({ className, children, ref, ...props }: SegmentedItemProps): import("react/jsx-runtime").JSX.Element;
|
|
21
15
|
export { SegmentedItem, SegmentedRoot };
|
|
@@ -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 };
|
|
@@ -1,6 +1,7 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import type { HTMLAttributes, ReactNode, Ref } from "react";
|
|
2
|
+
export type ShortcutKey = string | ReactNode;
|
|
2
3
|
export interface ShortcutProps extends HTMLAttributes<HTMLSpanElement> {
|
|
3
|
-
keys:
|
|
4
|
+
keys: ShortcutKey[];
|
|
4
5
|
ref?: Ref<HTMLSpanElement>;
|
|
5
6
|
}
|
|
6
7
|
declare function Shortcut({ className, keys, ref, ...props }: ShortcutProps): import("react/jsx-runtime").JSX.Element;
|
|
@@ -1,18 +1,19 @@
|
|
|
1
|
-
import
|
|
2
|
-
import {
|
|
3
|
-
export interface TabRootProps extends
|
|
4
|
-
|
|
5
|
-
defaultValue?: string;
|
|
6
|
-
onChange?: (value: string) => void;
|
|
7
|
-
ref?: Ref<HTMLDivElement>;
|
|
1
|
+
import * as TabsPrimitive from "@radix-ui/react-tabs";
|
|
2
|
+
import type { ComponentPropsWithoutRef, ComponentRef, Ref } from "react";
|
|
3
|
+
export interface TabRootProps extends ComponentPropsWithoutRef<typeof TabsPrimitive.Root> {
|
|
4
|
+
ref?: Ref<ComponentRef<typeof TabsPrimitive.Root>>;
|
|
8
5
|
}
|
|
9
|
-
declare function TabRoot({ className,
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
} & import("class-variance-authority/types").ClassProp) | undefined) => string;
|
|
13
|
-
export interface TabItemProps extends ButtonHTMLAttributes<HTMLButtonElement>, VariantProps<typeof tabItemVariants> {
|
|
14
|
-
value: string;
|
|
15
|
-
ref?: Ref<HTMLButtonElement>;
|
|
6
|
+
declare function TabRoot({ className, ref, ...props }: TabRootProps): import("react/jsx-runtime").JSX.Element;
|
|
7
|
+
export interface TabListProps extends ComponentPropsWithoutRef<typeof TabsPrimitive.List> {
|
|
8
|
+
ref?: Ref<ComponentRef<typeof TabsPrimitive.List>>;
|
|
16
9
|
}
|
|
17
|
-
declare function
|
|
18
|
-
export
|
|
10
|
+
declare function TabList({ className, ref, ...props }: TabListProps): import("react/jsx-runtime").JSX.Element;
|
|
11
|
+
export interface TabTriggerProps extends ComponentPropsWithoutRef<typeof TabsPrimitive.Trigger> {
|
|
12
|
+
ref?: Ref<ComponentRef<typeof TabsPrimitive.Trigger>>;
|
|
13
|
+
}
|
|
14
|
+
declare function TabTrigger({ className, ref, ...props }: TabTriggerProps): import("react/jsx-runtime").JSX.Element;
|
|
15
|
+
export interface TabContentProps extends ComponentPropsWithoutRef<typeof TabsPrimitive.Content> {
|
|
16
|
+
ref?: Ref<ComponentRef<typeof TabsPrimitive.Content>>;
|
|
17
|
+
}
|
|
18
|
+
declare function TabContent({ className, ref, ...props }: TabContentProps): import("react/jsx-runtime").JSX.Element;
|
|
19
|
+
export { TabContent, TabList, TabRoot, TabTrigger };
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export type {
|
|
2
|
-
export {
|
|
1
|
+
export type { TabContentProps, TabListProps, TabRootProps, TabTriggerProps, } from "./Tab";
|
|
2
|
+
export { TabContent, TabList, TabRoot, TabTrigger } from "./Tab";
|
|
@@ -1,12 +1,19 @@
|
|
|
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
|
+
/** 인풋 하단 도움말 텍스트 */
|
|
6
|
+
helperText?: string;
|
|
5
7
|
error?: boolean;
|
|
6
8
|
value?: string[];
|
|
7
9
|
defaultValue?: string[];
|
|
8
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;
|
|
9
16
|
ref?: Ref<HTMLInputElement>;
|
|
10
17
|
}
|
|
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;
|
|
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;
|
|
12
19
|
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 };
|