@aivex/ui 1.1.0-dev.8 → 1.1.0
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/README.md +2 -6
- package/dist/components/Avatar/Avatar.d.ts +10 -5
- package/dist/components/Badge/Badge.d.ts +18 -12
- package/dist/components/Badge/index.d.ts +2 -2
- 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 +5 -3
- package/dist/components/Card/Card.d.ts +9 -1
- package/dist/components/Checkbox/Checkbox.d.ts +2 -1
- package/dist/components/Checkbox/ChipsCheckbox.d.ts +4 -3
- package/dist/components/Chips/Chips.d.ts +6 -4
- package/dist/components/DataGrid/DataGrid.d.ts +92 -0
- package/dist/components/DataGrid/index.d.ts +4 -0
- package/dist/components/Dialog/Dialog.d.ts +20 -0
- package/dist/components/Dialog/index.d.ts +2 -0
- package/dist/components/Divider/Divider.d.ts +1 -1
- package/dist/components/DraggableScroll/DraggableScroll.d.ts +11 -0
- package/dist/components/DraggableScroll/index.d.ts +2 -0
- package/dist/components/Field/Field.d.ts +46 -0
- package/dist/components/Field/index.d.ts +1 -0
- package/dist/components/FilterModal/FilterModal.d.ts +32 -0
- package/dist/components/FilterModal/index.d.ts +2 -0
- package/dist/components/Icon/index.d.ts +280 -278
- package/dist/components/IconButton/IconButton.d.ts +2 -2
- package/dist/components/InputBase/InputBase.d.ts +8 -7
- package/dist/components/InteractionLayer/InteractionLayer.d.ts +3 -1
- package/dist/components/Logo/index.d.ts +16 -0
- package/dist/components/Menu/Menu.d.ts +79 -13
- package/dist/components/Menu/index.d.ts +2 -2
- package/dist/components/Messagebox/Messagebox.d.ts +4 -3
- package/dist/components/Modal/Modal.d.ts +33 -22
- package/dist/components/Modal/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/Panel/Panel.d.ts +13 -0
- package/dist/components/Panel/index.d.ts +2 -0
- package/dist/components/ProgressBar/ProgressBar.d.ts +13 -0
- package/dist/components/ProgressBar/index.d.ts +2 -0
- package/dist/components/Radio/Radio.d.ts +2 -2
- package/dist/components/ScrollArea/ScrollArea.d.ts +14 -0
- package/dist/components/ScrollArea/index.d.ts +2 -0
- package/dist/components/Segmented/Segmented.d.ts +11 -17
- package/dist/components/SelectBox/SelectBox.d.ts +2 -0
- package/dist/components/Shortcut/Shortcut.d.ts +3 -2
- package/dist/components/Skeleton/Skeleton.d.ts +7 -0
- package/dist/components/Skeleton/index.d.ts +2 -0
- package/dist/components/Slider/Slider.d.ts +9 -0
- package/dist/components/Slider/index.d.ts +2 -0
- package/dist/components/Switch/Switch.d.ts +6 -5
- package/dist/components/Tab/Tab.d.ts +17 -16
- package/dist/components/Tab/index.d.ts +2 -2
- package/dist/components/Table/Table.d.ts +38 -6
- package/dist/components/Table/index.d.ts +2 -2
- package/dist/components/Tag/Tag.d.ts +3 -2
- package/dist/components/Tagbox/Tagbox.d.ts +14 -3
- package/dist/components/Textarea/Textarea.d.ts +3 -3
- package/dist/components/Textbox/Textbox.d.ts +5 -4
- package/dist/components/Toast/Toast.d.ts +1 -1
- package/dist/components/Tooltip/Tooltip.d.ts +4 -4
- package/dist/components/Typography/Typography.d.ts +1 -1
- package/dist/components/UploadArea/UploadArea.d.ts +7 -1
- package/dist/index.cjs +24 -11
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.ts +13 -3
- package/dist/index.js +14048 -4880
- package/dist/index.js.map +1 -1
- package/dist/styles.css +1 -2
- package/dist/tokens/tokens.css +100 -13
- package/package.json +16 -4
- package/dist/components/Alert/Alert.d.ts +0 -16
- package/dist/components/Alert/index.d.ts +0 -2
- package/dist/theme.css +0 -154
package/README.md
CHANGED
|
@@ -31,19 +31,15 @@ export function Example() {
|
|
|
31
31
|
|
|
32
32
|
The generated styles are namespaced with the `aivex:` Tailwind prefix and `--aivex-*` CSS variables to avoid collisions with application styles.
|
|
33
33
|
|
|
34
|
-
### 2. Using design tokens in your own code
|
|
34
|
+
### 2. Using design tokens in your own code
|
|
35
35
|
|
|
36
|
-
|
|
36
|
+
`styles.css` also registers the Aivex design tokens into Tailwind, so you can use them directly in your own classes:
|
|
37
37
|
|
|
38
38
|
```css
|
|
39
39
|
/* global.css */
|
|
40
|
-
@import "tailwindcss";
|
|
41
40
|
@import "@aivex/ui/styles.css";
|
|
42
|
-
@import "@aivex/ui/theme.css";
|
|
43
41
|
```
|
|
44
42
|
|
|
45
|
-
This registers all design tokens into your Tailwind so you can use them directly:
|
|
46
|
-
|
|
47
43
|
```tsx
|
|
48
44
|
<div className="bg-bg-primary border border-border-default rounded-md p-xl">
|
|
49
45
|
<h1 className="text-text-primary text-heading-md">Title</h1>
|
|
@@ -1,15 +1,20 @@
|
|
|
1
1
|
import { type VariantProps } from "class-variance-authority";
|
|
2
2
|
import type { HTMLAttributes, ReactNode, Ref } from "react";
|
|
3
3
|
declare const avatarVariants: (props?: ({
|
|
4
|
-
size?: "
|
|
5
|
-
type?: "
|
|
4
|
+
size?: "2xl" | "lg" | "md" | "sm" | "xl" | "xs" | "xxs" | null | undefined;
|
|
5
|
+
type?: "image" | "round" | "square" | null | undefined;
|
|
6
6
|
} & import("class-variance-authority/types").ClassProp) | undefined) => string;
|
|
7
|
-
export interface AvatarProps extends Omit<HTMLAttributes<
|
|
7
|
+
export interface AvatarProps extends Omit<HTMLAttributes<HTMLSpanElement>, "children">, VariantProps<typeof avatarVariants> {
|
|
8
8
|
src?: string;
|
|
9
9
|
alt?: string;
|
|
10
10
|
initials?: string;
|
|
11
11
|
icon?: ReactNode;
|
|
12
|
-
|
|
12
|
+
name?: string;
|
|
13
|
+
bgColor?: string;
|
|
14
|
+
showTooltip?: boolean;
|
|
15
|
+
/** Fallback render delay in ms (only applies when `src` is provided). Default: 600ms. */
|
|
16
|
+
delayMs?: number;
|
|
17
|
+
ref?: Ref<HTMLSpanElement>;
|
|
13
18
|
}
|
|
14
|
-
declare function Avatar({ className, size, type, src, alt, initials, icon, ref, ...props }: AvatarProps): import("react/jsx-runtime").JSX.Element;
|
|
19
|
+
declare function Avatar({ className, size, type, src, alt, initials, icon, name, bgColor, showTooltip, delayMs, style, ref, ...props }: AvatarProps): import("react/jsx-runtime").JSX.Element;
|
|
15
20
|
export { Avatar, avatarVariants };
|
|
@@ -1,22 +1,28 @@
|
|
|
1
1
|
import { type VariantProps } from "class-variance-authority";
|
|
2
2
|
import type { HTMLAttributes, ReactNode, Ref } from "react";
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
3
|
+
type BadgeVariant = "filled" | "outline";
|
|
4
|
+
type BadgeColor = "blue" | "gray" | "red" | "green" | "yellow" | "orange" | "lime" | "teal" | "cyan" | "indigo" | "violet" | "pink";
|
|
5
|
+
declare const badgeVariants: (props?: ({
|
|
6
|
+
shape?: "pill" | "rect" | null | undefined;
|
|
7
|
+
treatment?: "filled" | "outline" | null | undefined;
|
|
8
|
+
size?: "md" | "sm" | "xs" | null | undefined;
|
|
9
|
+
color?: "blue" | "cyan" | "gray" | "green" | "indigo" | "lime" | "orange" | "pink" | "red" | "teal" | "violet" | "yellow" | null | undefined;
|
|
8
10
|
} & import("class-variance-authority/types").ClassProp) | undefined) => string;
|
|
9
|
-
export interface
|
|
11
|
+
export interface BadgeProps extends Omit<HTMLAttributes<HTMLSpanElement>, "color"> {
|
|
12
|
+
variant?: BadgeVariant;
|
|
13
|
+
rounded?: boolean;
|
|
14
|
+
size?: "xs" | "sm" | "md";
|
|
15
|
+
color?: BadgeColor;
|
|
10
16
|
children?: ReactNode;
|
|
11
17
|
ref?: Ref<HTMLSpanElement>;
|
|
12
18
|
}
|
|
13
|
-
declare function
|
|
14
|
-
declare const
|
|
19
|
+
declare function Badge({ className, variant, rounded, size, color, children, ref, ...props }: BadgeProps): import("react/jsx-runtime").JSX.Element;
|
|
20
|
+
declare const dotVariants: (props?: ({
|
|
15
21
|
type?: "essential" | "new" | null | undefined;
|
|
16
|
-
size?: "
|
|
22
|
+
size?: "lg" | "md" | "sm" | null | undefined;
|
|
17
23
|
} & import("class-variance-authority/types").ClassProp) | undefined) => string;
|
|
18
|
-
export interface
|
|
24
|
+
export interface DotProps extends HTMLAttributes<HTMLSpanElement>, VariantProps<typeof dotVariants> {
|
|
19
25
|
ref?: Ref<HTMLSpanElement>;
|
|
20
26
|
}
|
|
21
|
-
declare function
|
|
22
|
-
export {
|
|
27
|
+
declare function Dot({ className, type, size, ref, ...props }: DotProps): import("react/jsx-runtime").JSX.Element;
|
|
28
|
+
export { Badge, badgeVariants, Dot, dotVariants };
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export type {
|
|
2
|
-
export {
|
|
1
|
+
export type { BadgeProps, DotProps } from "./Badge";
|
|
2
|
+
export { Badge, badgeVariants, Dot, dotVariants } from "./Badge";
|
|
@@ -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";
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { type VariantProps } from "class-variance-authority";
|
|
2
2
|
import type { ButtonHTMLAttributes, ReactNode, Ref } from "react";
|
|
3
3
|
declare const buttonVariantStyles: (props?: ({
|
|
4
|
-
variant?: "
|
|
4
|
+
variant?: "ghost" | "outline" | "solid" | null | undefined;
|
|
5
5
|
color?: "danger" | "primary" | "secondary" | null | undefined;
|
|
6
|
-
size?: "
|
|
6
|
+
size?: "icon-lg" | "icon-md" | "icon-sm" | "lg" | "md" | "sm" | 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 & {
|
|
@@ -11,8 +11,10 @@ declare function buttonVariants({ variant, color, size, className, }?: ButtonVar
|
|
|
11
11
|
}): string;
|
|
12
12
|
export interface ButtonProps extends Omit<ButtonHTMLAttributes<HTMLButtonElement>, "color">, ButtonVariantProps {
|
|
13
13
|
asChild?: boolean;
|
|
14
|
+
startContent?: ReactNode;
|
|
15
|
+
endContent?: ReactNode;
|
|
14
16
|
children?: ReactNode;
|
|
15
17
|
ref?: Ref<HTMLButtonElement>;
|
|
16
18
|
}
|
|
17
|
-
declare function Button({ className, variant, color, size, asChild, ref, children, ...props }: ButtonProps): import("react/jsx-runtime").JSX.Element;
|
|
19
|
+
declare function Button({ className, variant, color, size, asChild, startContent, endContent, ref, children, ...props }: ButtonProps): import("react/jsx-runtime").JSX.Element;
|
|
18
20
|
export { Button, buttonVariants };
|
|
@@ -1,7 +1,15 @@
|
|
|
1
1
|
import type { HTMLAttributes, ReactNode, Ref } from "react";
|
|
2
2
|
export interface CardProps extends HTMLAttributes<HTMLDivElement> {
|
|
3
|
+
/** 호버·포커스·pressed 인터랙션 스타일을 추가합니다. 클릭/링크는 호출측에서 직접 연결하세요. */
|
|
4
|
+
interactive?: boolean;
|
|
5
|
+
/** 선택된 상태. brand 색 border + brand-subtle 배경을 적용합니다. */
|
|
6
|
+
selected?: boolean;
|
|
7
|
+
/** 비활성 상태. 인터랙션 스타일과 이벤트 핸들러를 비활성화합니다. */
|
|
8
|
+
disabled?: boolean;
|
|
9
|
+
/** 자식 컴포넌트(Link 등)에 Card 스타일과 상태를 위임합니다. */
|
|
10
|
+
asChild?: boolean;
|
|
3
11
|
children?: ReactNode;
|
|
4
12
|
ref?: Ref<HTMLDivElement>;
|
|
5
13
|
}
|
|
6
|
-
declare function Card({ className, children, ref, ...props }: CardProps): import("react/jsx-runtime").JSX.Element;
|
|
14
|
+
declare function Card({ className, interactive, selected, disabled, asChild, children, ref, onClick, onDoubleClick, onKeyDown, tabIndex, "aria-disabled": ariaDisabled, ...props }: CardProps): import("react/jsx-runtime").JSX.Element;
|
|
7
15
|
export { Card };
|
|
@@ -1,9 +1,10 @@
|
|
|
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?: "
|
|
4
|
+
size?: "md" | "sm" | 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
|
+
/** @deprecated <Field orientation="horizontal"><FieldControl><Checkbox/></FieldControl><FieldLabel>…</FieldLabel></Field> 를 사용하세요. */
|
|
7
8
|
label?: string;
|
|
8
9
|
indeterminate?: boolean;
|
|
9
10
|
ref?: Ref<HTMLInputElement>;
|
|
@@ -1,6 +1,7 @@
|
|
|
1
|
-
import { type InputHTMLAttributes, type Ref } from "react";
|
|
2
|
-
export interface ChipsCheckboxProps extends Omit<InputHTMLAttributes<HTMLInputElement>, "type"> {
|
|
1
|
+
import React, { type InputHTMLAttributes, type Ref } from "react";
|
|
2
|
+
export interface ChipsCheckboxProps extends Omit<InputHTMLAttributes<HTMLInputElement>, "type" | "onClick"> {
|
|
3
3
|
ref?: Ref<HTMLInputElement>;
|
|
4
|
+
onClick?: React.MouseEventHandler<HTMLLabelElement>;
|
|
4
5
|
}
|
|
5
|
-
declare function ChipsCheckbox({ className, disabled, checked, defaultChecked, onChange, id, ref, ...props }: ChipsCheckboxProps): import("react/jsx-runtime").JSX.Element;
|
|
6
|
+
declare function ChipsCheckbox({ className, disabled, checked, defaultChecked, onChange, onClick, id, ref, ...props }: ChipsCheckboxProps): import("react/jsx-runtime").JSX.Element;
|
|
6
7
|
export { ChipsCheckbox };
|
|
@@ -1,15 +1,17 @@
|
|
|
1
1
|
import { type VariantProps } from "class-variance-authority";
|
|
2
2
|
import { type ButtonHTMLAttributes, type ReactNode, type Ref } from "react";
|
|
3
3
|
declare const chipsVariants: (props?: ({
|
|
4
|
-
shape?: "
|
|
5
|
-
size?: "
|
|
6
|
-
type?: "
|
|
4
|
+
shape?: "rectangle" | "rounded" | null | undefined;
|
|
5
|
+
size?: "md" | "sm" | null | undefined;
|
|
6
|
+
type?: "icon" | "text" | null | undefined;
|
|
7
7
|
active?: boolean | null | undefined;
|
|
8
8
|
} & import("class-variance-authority/types").ClassProp) | undefined) => string;
|
|
9
9
|
export interface ChipsProps extends Omit<ButtonHTMLAttributes<HTMLButtonElement>, "type">, VariantProps<typeof chipsVariants> {
|
|
10
|
+
startContent?: ReactNode;
|
|
11
|
+
endContent?: ReactNode;
|
|
10
12
|
children?: ReactNode;
|
|
11
13
|
ref?: Ref<HTMLButtonElement>;
|
|
12
14
|
defaultActive?: boolean;
|
|
13
15
|
}
|
|
14
|
-
declare function Chips({ className, shape, size, type, active, defaultActive, children, ref, onClick, ...props }: ChipsProps): import("react/jsx-runtime").JSX.Element;
|
|
16
|
+
declare function Chips({ className, shape, size, type, active, defaultActive, startContent, endContent, children, ref, onClick, ...props }: ChipsProps): import("react/jsx-runtime").JSX.Element;
|
|
15
17
|
export { Chips, chipsVariants };
|
|
@@ -0,0 +1,92 @@
|
|
|
1
|
+
import { type RowData, type TableOptions } from "@tanstack/react-table";
|
|
2
|
+
import type { HTMLAttributes, MouseEvent, ReactNode, Ref } from "react";
|
|
3
|
+
import { type ScrollAreaProps } from "@/components/ScrollArea";
|
|
4
|
+
export type DataGridAlign = "start" | "center" | "end";
|
|
5
|
+
type DataGridValue<TData, TValue> = TValue | ((row: TData, index: number) => TValue);
|
|
6
|
+
declare module "@tanstack/react-table" {
|
|
7
|
+
interface ColumnMeta<TData extends RowData, TValue> {
|
|
8
|
+
align?: DataGridAlign;
|
|
9
|
+
headerAlign?: DataGridAlign;
|
|
10
|
+
cellAlign?: DataGridAlign;
|
|
11
|
+
className?: string;
|
|
12
|
+
headerClassName?: string;
|
|
13
|
+
cellClassName?: DataGridValue<TData, string | undefined>;
|
|
14
|
+
headerSortTrigger?: boolean;
|
|
15
|
+
}
|
|
16
|
+
}
|
|
17
|
+
export interface DataGridRootProps extends HTMLAttributes<HTMLDivElement> {
|
|
18
|
+
ref?: Ref<HTMLDivElement>;
|
|
19
|
+
}
|
|
20
|
+
declare function DataGridRoot({ className, children, ref, ...props }: DataGridRootProps): import("react/jsx-runtime").JSX.Element;
|
|
21
|
+
export interface DataGridViewportProps extends ScrollAreaProps {
|
|
22
|
+
ref?: Ref<HTMLDivElement>;
|
|
23
|
+
}
|
|
24
|
+
declare function DataGridViewport({ className, children, ref, scrollbars, type, ...props }: DataGridViewportProps): import("react/jsx-runtime").JSX.Element;
|
|
25
|
+
export interface DataGridHeaderProps extends HTMLAttributes<HTMLDivElement> {
|
|
26
|
+
sticky?: boolean;
|
|
27
|
+
ref?: Ref<HTMLDivElement>;
|
|
28
|
+
}
|
|
29
|
+
declare function DataGridHeader({ className, children, sticky, ref, ...props }: DataGridHeaderProps): import("react/jsx-runtime").JSX.Element;
|
|
30
|
+
export interface DataGridBodyProps extends HTMLAttributes<HTMLDivElement> {
|
|
31
|
+
ref?: Ref<HTMLDivElement>;
|
|
32
|
+
}
|
|
33
|
+
declare function DataGridBody({ className, children, ref, ...props }: DataGridBodyProps): import("react/jsx-runtime").JSX.Element;
|
|
34
|
+
export interface DataGridRowProps extends HTMLAttributes<HTMLDivElement> {
|
|
35
|
+
asChild?: boolean;
|
|
36
|
+
selected?: boolean;
|
|
37
|
+
disabled?: boolean;
|
|
38
|
+
interactive?: boolean;
|
|
39
|
+
ref?: Ref<HTMLDivElement>;
|
|
40
|
+
}
|
|
41
|
+
declare function DataGridRow({ className, children, asChild, selected, disabled, interactive, ref, onClick, onDoubleClick, onKeyDown, tabIndex, "aria-disabled": ariaDisabled, ...props }: DataGridRowProps): import("react/jsx-runtime").JSX.Element;
|
|
42
|
+
export interface DataGridCellProps extends HTMLAttributes<HTMLDivElement> {
|
|
43
|
+
align?: DataGridAlign;
|
|
44
|
+
asChild?: boolean;
|
|
45
|
+
ref?: Ref<HTMLDivElement>;
|
|
46
|
+
}
|
|
47
|
+
declare function DataGridCell({ className, children, align, asChild, ref, ...props }: DataGridCellProps): import("react/jsx-runtime").JSX.Element;
|
|
48
|
+
export interface DataGridHeaderCellProps extends HTMLAttributes<HTMLDivElement> {
|
|
49
|
+
align?: DataGridAlign;
|
|
50
|
+
asChild?: boolean;
|
|
51
|
+
ref?: Ref<HTMLDivElement>;
|
|
52
|
+
}
|
|
53
|
+
declare function DataGridHeaderCell({ className, children, align, asChild, ref, ...props }: DataGridHeaderCellProps): import("react/jsx-runtime").JSX.Element;
|
|
54
|
+
export interface DataGridEmptyProps extends HTMLAttributes<HTMLDivElement> {
|
|
55
|
+
children?: ReactNode;
|
|
56
|
+
ref?: Ref<HTMLDivElement>;
|
|
57
|
+
}
|
|
58
|
+
declare function DataGridEmpty({ className, children, ref, ...props }: DataGridEmptyProps): import("react/jsx-runtime").JSX.Element;
|
|
59
|
+
export interface DataGridLoadingProps extends HTMLAttributes<HTMLDivElement> {
|
|
60
|
+
rowCount?: number;
|
|
61
|
+
ref?: Ref<HTMLDivElement>;
|
|
62
|
+
}
|
|
63
|
+
declare function DataGridLoading({ className, rowCount, ref, ...props }: DataGridLoadingProps): import("react/jsx-runtime").JSX.Element;
|
|
64
|
+
export interface DataGridInfiniteTriggerProps extends HTMLAttributes<HTMLDivElement> {
|
|
65
|
+
loading?: boolean;
|
|
66
|
+
ref?: Ref<HTMLDivElement>;
|
|
67
|
+
}
|
|
68
|
+
declare function DataGridInfiniteTrigger({ className, children, loading, ref, ...props }: DataGridInfiniteTriggerProps): import("react/jsx-runtime").JSX.Element;
|
|
69
|
+
export interface DataGridProps<TData> extends Omit<TableOptions<TData>, "getCoreRowModel"> {
|
|
70
|
+
getCoreRowModel?: TableOptions<TData>["getCoreRowModel"];
|
|
71
|
+
className?: string;
|
|
72
|
+
ref?: Ref<HTMLDivElement>;
|
|
73
|
+
loading?: boolean;
|
|
74
|
+
loadingRowCount?: number;
|
|
75
|
+
empty?: ReactNode;
|
|
76
|
+
headerSticky?: boolean;
|
|
77
|
+
viewportClassName?: string;
|
|
78
|
+
contentClassName?: string;
|
|
79
|
+
headerClassName?: string;
|
|
80
|
+
bodyClassName?: string;
|
|
81
|
+
rowClassName?: DataGridValue<TData, string | undefined>;
|
|
82
|
+
rowInteractive?: DataGridValue<TData, boolean>;
|
|
83
|
+
isRowSelected?: (row: TData, index: number) => boolean;
|
|
84
|
+
isRowDisabled?: (row: TData, index: number) => boolean;
|
|
85
|
+
onRowClick?: (row: TData, index: number, event: MouseEvent<HTMLDivElement>) => void;
|
|
86
|
+
loadingMore?: boolean;
|
|
87
|
+
loadingMoreContent?: ReactNode;
|
|
88
|
+
infiniteTriggerRef?: Ref<HTMLDivElement>;
|
|
89
|
+
infiniteTriggerClassName?: string;
|
|
90
|
+
}
|
|
91
|
+
declare function DataGrid<TData>({ className, loading, loadingRowCount, empty, headerSticky, viewportClassName, contentClassName, headerClassName, bodyClassName, rowClassName, rowInteractive, isRowSelected, isRowDisabled, onRowClick, loadingMore, loadingMoreContent, infiniteTriggerRef, infiniteTriggerClassName, ref, getCoreRowModel, ...tableOptions }: DataGridProps<TData>): import("react/jsx-runtime").JSX.Element;
|
|
92
|
+
export { DataGrid, DataGridBody, DataGridCell, DataGridEmpty, DataGridHeader, DataGridHeaderCell, DataGridInfiniteTrigger, DataGridLoading, DataGridRoot, DataGridRow, DataGridViewport, };
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
export type { CellContext, ColumnDef, ColumnFiltersState, ColumnOrderState, ColumnPinningState, ColumnSizingState, ExpandedState, GroupingState, PaginationState, Row, RowSelectionState, SortingState, Table as ReactTableInstance, TableOptions, VisibilityState, } from "@tanstack/react-table";
|
|
2
|
+
export { getCoreRowModel, getExpandedRowModel, getFacetedMinMaxValues, getFacetedRowModel, getFacetedUniqueValues, getFilteredRowModel, getGroupedRowModel, getPaginationRowModel, getSortedRowModel, } from "@tanstack/react-table";
|
|
3
|
+
export type { DataGridAlign, DataGridBodyProps, DataGridCellProps, DataGridEmptyProps, DataGridHeaderCellProps, DataGridHeaderProps, DataGridInfiniteTriggerProps, DataGridLoadingProps, DataGridProps, DataGridRootProps, DataGridRowProps, DataGridViewportProps, } from "./DataGrid";
|
|
4
|
+
export { DataGrid, DataGridBody, DataGridCell, DataGridEmpty, DataGridHeader, DataGridHeaderCell, DataGridInfiniteTrigger, DataGridLoading, DataGridRoot, DataGridRow, DataGridViewport, } from "./DataGrid";
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import * as RadixDialog from "@radix-ui/react-alert-dialog";
|
|
2
|
+
import type { ComponentPropsWithoutRef, ReactNode, Ref } from "react";
|
|
3
|
+
import { type ButtonProps } from "@/components/Button";
|
|
4
|
+
export type DialogVariant = "default" | "warning";
|
|
5
|
+
export interface DialogButtonProps extends Omit<ButtonProps, "asChild" | "children" | "className" | "color" | "ref" | "size" | "style" | "variant"> {
|
|
6
|
+
children: ReactNode;
|
|
7
|
+
}
|
|
8
|
+
export type DialogConfirmButtonProps = DialogButtonProps;
|
|
9
|
+
export interface DialogProps extends Omit<ComponentPropsWithoutRef<typeof RadixDialog.Root>, "children"> {
|
|
10
|
+
variant?: DialogVariant;
|
|
11
|
+
title: ReactNode;
|
|
12
|
+
description?: ReactNode;
|
|
13
|
+
children?: ReactNode;
|
|
14
|
+
cancelButton?: DialogButtonProps;
|
|
15
|
+
confirmButton?: DialogConfirmButtonProps;
|
|
16
|
+
showIcon?: boolean;
|
|
17
|
+
ref?: Ref<HTMLDivElement>;
|
|
18
|
+
}
|
|
19
|
+
declare function Dialog({ open, defaultOpen, onOpenChange, variant, title, description, children, cancelButton, confirmButton, showIcon, ref, ...props }: DialogProps): import("react/jsx-runtime").JSX.Element;
|
|
20
|
+
export { Dialog };
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { type VariantProps } from "class-variance-authority";
|
|
2
2
|
import type { HTMLAttributes, Ref } from "react";
|
|
3
3
|
declare const dividerVariants: (props?: ({
|
|
4
|
-
strength?: "
|
|
4
|
+
strength?: "basic" | "bold" | null | undefined;
|
|
5
5
|
direction?: "horizontal" | "vertical" | null | undefined;
|
|
6
6
|
} & import("class-variance-authority/types").ClassProp) | undefined) => string;
|
|
7
7
|
export interface DividerProps extends HTMLAttributes<HTMLHRElement>, VariantProps<typeof dividerVariants> {
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { type ReactNode } from "react";
|
|
2
|
+
interface DraggableScrollProps {
|
|
3
|
+
children: ReactNode;
|
|
4
|
+
className?: string;
|
|
5
|
+
/** children이 바뀔 때 가로 스크롤을 끝으로 이동합니다. */
|
|
6
|
+
autoScrollToEnd?: boolean;
|
|
7
|
+
smoothScroll?: boolean;
|
|
8
|
+
}
|
|
9
|
+
declare function DraggableScroll({ children, className, autoScrollToEnd, smoothScroll, }: DraggableScrollProps): import("react/jsx-runtime").JSX.Element;
|
|
10
|
+
export type { DraggableScrollProps };
|
|
11
|
+
export { DraggableScroll };
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
import { type VariantProps } from "class-variance-authority";
|
|
2
|
+
import { type HTMLAttributes, type LabelHTMLAttributes, type ReactNode, type Ref } from "react";
|
|
3
|
+
declare const fieldVariants: (props?: ({
|
|
4
|
+
orientation?: "horizontal" | "vertical" | null | undefined;
|
|
5
|
+
} & import("class-variance-authority/types").ClassProp) | undefined) => string;
|
|
6
|
+
export interface FieldProps extends HTMLAttributes<HTMLDivElement>, VariantProps<typeof fieldVariants> {
|
|
7
|
+
/** 외부에서 id를 지정. 없으면 자동 생성 */
|
|
8
|
+
fieldId?: string;
|
|
9
|
+
invalid?: boolean;
|
|
10
|
+
disabled?: boolean;
|
|
11
|
+
ref?: Ref<HTMLDivElement>;
|
|
12
|
+
}
|
|
13
|
+
/**
|
|
14
|
+
* 폼 필드 래퍼. 라벨/설명/에러를 어떤 컨트롤(Textbox, Checkbox 등)과도
|
|
15
|
+
* 조합할 수 있게 하는 합성 프리미티브. react-hook-form 등 특정 폼 라이브러리에
|
|
16
|
+
* 종속되지 않으며, 컨텍스트로 id/aria를 자동 연결한다.
|
|
17
|
+
*/
|
|
18
|
+
declare function Field({ className, orientation, fieldId, invalid, disabled, ref, ...props }: FieldProps): import("react/jsx-runtime").JSX.Element;
|
|
19
|
+
export interface FieldLabelProps extends LabelHTMLAttributes<HTMLLabelElement> {
|
|
20
|
+
ref?: Ref<HTMLLabelElement>;
|
|
21
|
+
}
|
|
22
|
+
declare function FieldLabel({ className, ref, ...props }: FieldLabelProps): import("react/jsx-runtime").JSX.Element;
|
|
23
|
+
export interface FieldContentProps extends HTMLAttributes<HTMLDivElement> {
|
|
24
|
+
ref?: Ref<HTMLDivElement>;
|
|
25
|
+
}
|
|
26
|
+
/**
|
|
27
|
+
* 가로 배치(Checkbox 등)에서 라벨과 설명을 세로로 묶는 그룹.
|
|
28
|
+
*/
|
|
29
|
+
declare function FieldContent({ className, ref, ...props }: FieldContentProps): import("react/jsx-runtime").JSX.Element;
|
|
30
|
+
export interface FieldControlProps {
|
|
31
|
+
children: ReactNode;
|
|
32
|
+
}
|
|
33
|
+
/**
|
|
34
|
+
* 컨트롤(단일 요소)을 감싸 id/aria를 자동 주입한다.
|
|
35
|
+
* 자식은 id/aria-* 를 내부 input 으로 전달하는 컴포넌트여야 한다(Textbox, Checkbox 등).
|
|
36
|
+
*/
|
|
37
|
+
declare function FieldControl({ children }: FieldControlProps): import("react/jsx-runtime").JSX.Element;
|
|
38
|
+
export interface FieldDescriptionProps extends HTMLAttributes<HTMLParagraphElement> {
|
|
39
|
+
ref?: Ref<HTMLParagraphElement>;
|
|
40
|
+
}
|
|
41
|
+
declare function FieldDescription({ className, ref, ...props }: FieldDescriptionProps): import("react/jsx-runtime").JSX.Element;
|
|
42
|
+
export interface FieldErrorProps extends HTMLAttributes<HTMLParagraphElement> {
|
|
43
|
+
ref?: Ref<HTMLParagraphElement>;
|
|
44
|
+
}
|
|
45
|
+
declare function FieldError({ className, children, ref, ...props }: FieldErrorProps): import("react/jsx-runtime").JSX.Element | null;
|
|
46
|
+
export { Field, FieldContent, FieldControl, FieldDescription, FieldError, FieldLabel, fieldVariants, };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from "./Field";
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import { type ReactNode } from "react";
|
|
2
|
+
export interface FilterOption {
|
|
3
|
+
label: string;
|
|
4
|
+
value: string;
|
|
5
|
+
icon?: ReactNode;
|
|
6
|
+
}
|
|
7
|
+
export interface FilterGroup {
|
|
8
|
+
groupLabel: string;
|
|
9
|
+
groupValue: string;
|
|
10
|
+
options: FilterOption[];
|
|
11
|
+
}
|
|
12
|
+
export interface FilterValue {
|
|
13
|
+
groupValue: string;
|
|
14
|
+
optionValue: string;
|
|
15
|
+
}
|
|
16
|
+
export interface FilterModalProps {
|
|
17
|
+
open: boolean;
|
|
18
|
+
onClose: () => void;
|
|
19
|
+
onApply: (filterState: FilterValue[]) => void;
|
|
20
|
+
options: FilterGroup[];
|
|
21
|
+
values: FilterValue[];
|
|
22
|
+
/** 모달 제목 */
|
|
23
|
+
title: ReactNode;
|
|
24
|
+
/** 초기화 버튼 라벨 */
|
|
25
|
+
clearLabel: ReactNode;
|
|
26
|
+
/** 적용 버튼 라벨 */
|
|
27
|
+
applyLabel: ReactNode;
|
|
28
|
+
/** 옵션이 없을 때 표시할 텍스트 */
|
|
29
|
+
emptyText: ReactNode;
|
|
30
|
+
}
|
|
31
|
+
declare const FilterModal: import("react").MemoExoticComponent<({ open, onClose, onApply, options, values, title, clearLabel, applyLabel, emptyText, }: FilterModalProps) => import("react/jsx-runtime").JSX.Element>;
|
|
32
|
+
export { FilterModal };
|