@zscloud/design 0.2.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/LICENSE +21 -0
- package/dist/_icon/app-icon.d.ts +8 -0
- package/dist/_icon/app-icons-mapping.d.ts +230 -0
- package/dist/_icon/icon.d.ts +12 -0
- package/dist/_icon/icons-mapping.d.ts +3866 -0
- package/dist/_icon/index.d.ts +3 -0
- package/dist/_icon/type.d.ts +14 -0
- package/dist/_utils.d.ts +17 -0
- package/dist/components/biz/app-base/index.d.ts +18 -0
- package/dist/components/biz/config/index.d.ts +15 -0
- package/dist/components/biz/constant/index.d.ts +8 -0
- package/dist/components/biz/copy/index.d.ts +6 -0
- package/dist/components/biz/date-value.d.ts +5 -0
- package/dist/components/biz/dropdown-action/index.d.ts +16 -0
- package/dist/components/biz/field/field-group.d.ts +5 -0
- package/dist/components/biz/field/field-operations.d.ts +9 -0
- package/dist/components/biz/field/index.d.ts +33 -0
- package/dist/components/biz/file-upload/index.d.ts +1 -0
- package/dist/components/biz/file-upload/types.d.ts +6 -0
- package/dist/components/biz/file-upload/utils/calc-file-hash.d.ts +36 -0
- package/dist/components/biz/file-upload/utils/request.d.ts +24 -0
- package/dist/components/biz/file-upload/worker/hash.worker.d.ts +0 -0
- package/dist/components/biz/file-upload/worker/simple-hash.work.d.ts +0 -0
- package/dist/components/biz/header/header-breadcrumb.d.ts +12 -0
- package/dist/components/biz/header/header-detail.d.ts +11 -0
- package/dist/components/biz/header/header-page.d.ts +8 -0
- package/dist/components/biz/header/index.d.ts +3 -0
- package/dist/components/biz/helper-doc/index.d.ts +8 -0
- package/dist/components/biz/hooks/use-admin-uuid.d.ts +1 -0
- package/dist/components/biz/info/index.d.ts +55 -0
- package/dist/components/biz/info-popover/index.d.ts +46 -0
- package/dist/components/biz/locale-container/index.d.ts +3 -0
- package/dist/components/biz/locale-container/type.d.ts +8 -0
- package/dist/components/biz/no-data/index.d.ts +12 -0
- package/dist/components/biz/panic-fallback/index.d.ts +1 -0
- package/dist/components/biz/smart-tip/index.d.ts +90 -0
- package/dist/components/biz/state/index.d.ts +25 -0
- package/dist/components/primitive/alert-dialog.d.ts +31 -0
- package/dist/components/primitive/alert.d.ts +16 -0
- package/dist/components/primitive/auto-complete.d.ts +20 -0
- package/dist/components/primitive/badge.d.ts +80 -0
- package/dist/components/primitive/breadcrumb.d.ts +26 -0
- package/dist/components/primitive/button.d.ts +15 -0
- package/dist/components/primitive/calendar.d.ts +8 -0
- package/dist/components/primitive/card.d.ts +27 -0
- package/dist/components/primitive/cascader.d.ts +117 -0
- package/dist/components/primitive/chart.d.ts +62 -0
- package/dist/components/primitive/checkbox-group.d.ts +14 -0
- package/dist/components/primitive/checkbox.d.ts +7 -0
- package/dist/components/primitive/code-editor/index.d.ts +67 -0
- package/dist/components/primitive/collapse.d.ts +17 -0
- package/dist/components/primitive/context-menu.d.ts +48 -0
- package/dist/components/primitive/date-picker.d.ts +44 -0
- package/dist/components/primitive/dialog.d.ts +66 -0
- package/dist/components/primitive/divider.d.ts +14 -0
- package/dist/components/primitive/drawer.d.ts +47 -0
- package/dist/components/primitive/dropdown-menu.d.ts +55 -0
- package/dist/components/primitive/file-upload/file-upload-single.d.ts +11 -0
- package/dist/components/primitive/file-upload/index.d.ts +1 -0
- package/dist/components/primitive/form.d.ts +32 -0
- package/dist/components/primitive/image-reader/index.d.ts +7 -0
- package/dist/components/primitive/input-number.d.ts +17 -0
- package/dist/components/primitive/input-password.d.ts +19 -0
- package/dist/components/primitive/input.d.ts +5 -0
- package/dist/components/primitive/json-viewer.d.ts +22 -0
- package/dist/components/primitive/label.d.ts +5 -0
- package/dist/components/primitive/link.d.ts +11 -0
- package/dist/components/primitive/loader.d.ts +3 -0
- package/dist/components/primitive/markdown/index.d.ts +30 -0
- package/dist/components/primitive/multi-select.d.ts +76 -0
- package/dist/components/primitive/pagination/index.d.ts +8 -0
- package/dist/components/primitive/pagination/pagination.d.ts +31 -0
- package/dist/components/primitive/popover-confirm.d.ts +32 -0
- package/dist/components/primitive/popover.d.ts +12 -0
- package/dist/components/primitive/progress.d.ts +32 -0
- package/dist/components/primitive/radio-group.d.ts +49 -0
- package/dist/components/primitive/range-picker.d.ts +18 -0
- package/dist/components/primitive/resizable.d.ts +25 -0
- package/dist/components/primitive/search-input.d.ts +8 -0
- package/dist/components/primitive/select.d.ts +74 -0
- package/dist/components/primitive/selection-cancellation.d.ts +9 -0
- package/dist/components/primitive/show.d.ts +8 -0
- package/dist/components/primitive/slider.d.ts +4 -0
- package/dist/components/primitive/spin.d.ts +52 -0
- package/dist/components/primitive/status-badge.d.ts +19 -0
- package/dist/components/primitive/steps.d.ts +75 -0
- package/dist/components/primitive/switch.d.ts +4 -0
- package/dist/components/primitive/tabs/hooks/use-persist-tab-store.d.ts +4 -0
- package/dist/components/primitive/tabs/interface/tab-memo.d.ts +5 -0
- package/dist/components/primitive/tabs/store/page-state-store.d.ts +17 -0
- package/dist/components/primitive/tabs/tabs.d.ts +40 -0
- package/dist/components/primitive/tabs/use-persist.d.ts +4 -0
- package/dist/components/primitive/tabs/use-store.d.ts +25 -0
- package/dist/components/primitive/tag-list.d.ts +22 -0
- package/dist/components/primitive/tag.d.ts +17 -0
- package/dist/components/primitive/text.d.ts +27 -0
- package/dist/components/primitive/textarea.d.ts +8 -0
- package/dist/components/primitive/time-picker.d.ts +41 -0
- package/dist/components/primitive/toast/toast.d.ts +17 -0
- package/dist/components/primitive/toast/toaster.d.ts +1 -0
- package/dist/components/primitive/toast/use-toast.d.ts +45 -0
- package/dist/components/primitive/tooltip/index.d.ts +38 -0
- package/dist/components/primitive/tooltip/use-placement.d.ts +4 -0
- package/dist/components/primitive/tree/index.d.ts +5 -0
- package/dist/components/primitive/tree/tree-node.d.ts +17 -0
- package/dist/components/primitive/tree/tree-select.d.ts +21 -0
- package/dist/components/primitive/tree/tree.d.ts +24 -0
- package/dist/components/primitive/tree/types.d.ts +123 -0
- package/dist/i18n/locales/en-US.json.d.ts +76 -0
- package/dist/i18n/locales/zh-CN.json.d.ts +76 -0
- package/dist/index.d.ts +113 -0
- package/dist/style.css +2 -0
- package/dist/utils/overlay-context.d.ts +34 -0
- package/dist/utils/use-container.d.ts +30 -0
- package/dist/utils/use-id.d.ts +1 -0
- package/dist/utils/use-overlay.d.ts +34 -0
- package/dist/zscloud-design.es.js +33683 -0
- package/package.json +116 -0
|
@@ -0,0 +1,80 @@
|
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
import { VariantProps } from 'class-variance-authority';
|
|
3
|
+
declare const badgeVariants: (props?: ({
|
|
4
|
+
variant?: "outline" | "danger" | "alert" | "base" | "info" | "inprogress" | "increase" | "decrease" | null | undefined;
|
|
5
|
+
size?: "default" | "dot" | null | undefined;
|
|
6
|
+
} & import('class-variance-authority/types').ClassProp) | undefined) => string;
|
|
7
|
+
export interface BadgeProps extends React.HTMLAttributes<HTMLSpanElement>, VariantProps<typeof badgeVariants> {
|
|
8
|
+
/**
|
|
9
|
+
* 徽标变体
|
|
10
|
+
* - base: 基础徽标(灰色背景)
|
|
11
|
+
* - outline: 描边徽标(透明背景 + 灰色边框)
|
|
12
|
+
* - info: 提示徽标(蓝色)
|
|
13
|
+
* - danger: 危险徽标(红色)
|
|
14
|
+
* - alert: 警告徽标(橙色)
|
|
15
|
+
* - inprogress: 进行中徽标(蓝色)
|
|
16
|
+
* - increase: 增加徽标(绿色背景)
|
|
17
|
+
* - decrease: 减少徽标(红色背景)
|
|
18
|
+
*/
|
|
19
|
+
variant?: "base" | "outline" | "info" | "danger" | "alert" | "inprogress" | "increase" | "decrease";
|
|
20
|
+
/**
|
|
21
|
+
* 徽标尺寸
|
|
22
|
+
* - default: 默认尺寸(16px 高度)
|
|
23
|
+
* - dot: 圆点尺寸(8px)
|
|
24
|
+
*/
|
|
25
|
+
size?: "default" | "dot";
|
|
26
|
+
/**
|
|
27
|
+
* 徽标内容(数字或文本)
|
|
28
|
+
*/
|
|
29
|
+
count?: number | string;
|
|
30
|
+
/**
|
|
31
|
+
* 最大显示数字,超过显示为 {max}+
|
|
32
|
+
* @default 99
|
|
33
|
+
*/
|
|
34
|
+
max?: number;
|
|
35
|
+
/**
|
|
36
|
+
* 是否显示为圆点
|
|
37
|
+
*/
|
|
38
|
+
dot?: boolean;
|
|
39
|
+
}
|
|
40
|
+
/**
|
|
41
|
+
* Badge 徽标组件
|
|
42
|
+
*
|
|
43
|
+
* 用于显示数字、状态或其他简短信息的小型徽标。
|
|
44
|
+
*
|
|
45
|
+
* @example
|
|
46
|
+
* ```tsx
|
|
47
|
+
* // 基础用法
|
|
48
|
+
* <Badge count={5} />
|
|
49
|
+
*
|
|
50
|
+
* // 不同变体
|
|
51
|
+
* <Badge variant="danger" count={12} />
|
|
52
|
+
* <Badge variant="info" count={99} />
|
|
53
|
+
*
|
|
54
|
+
* // 描边徽标(透明背景 + 边框)
|
|
55
|
+
* <Badge variant="outline" count="默认" />
|
|
56
|
+
*
|
|
57
|
+
* // 圆点徽标
|
|
58
|
+
* <Badge dot />
|
|
59
|
+
* <Badge variant="danger" dot />
|
|
60
|
+
*
|
|
61
|
+
* // 自定义最大值
|
|
62
|
+
* <Badge count={100} max={99} /> // 显示 99+
|
|
63
|
+
*
|
|
64
|
+
* // 增减徽标
|
|
65
|
+
* <Badge variant="increase" count="+188" />
|
|
66
|
+
* <Badge variant="decrease" count="-122" />
|
|
67
|
+
* ```
|
|
68
|
+
*/
|
|
69
|
+
export declare const Badge: ({ children, className, variant, size: sizeProp, count, max, dot, ...rest }: BadgeProps) => import("react/jsx-runtime").JSX.Element | null;
|
|
70
|
+
/**
|
|
71
|
+
* BadgeDot 圆点徽标组件(Badge 的快捷方式)
|
|
72
|
+
*
|
|
73
|
+
* @example
|
|
74
|
+
* ```tsx
|
|
75
|
+
* <BadgeDot />
|
|
76
|
+
* <BadgeDot variant="danger" />
|
|
77
|
+
* ```
|
|
78
|
+
*/
|
|
79
|
+
export declare const BadgeDot: ({ variant, className, ...rest }: Omit<BadgeProps, "dot" | "count" | "max" | "size">) => import("react/jsx-runtime").JSX.Element;
|
|
80
|
+
export {};
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
declare const Breadcrumb: React.ForwardRefExoticComponent<Omit<React.DetailedHTMLProps<React.HTMLAttributes<HTMLElement>, HTMLElement>, "ref"> & {
|
|
3
|
+
separator?: React.ReactNode;
|
|
4
|
+
} & React.RefAttributes<HTMLElement>>;
|
|
5
|
+
declare const BreadcrumbList: React.ForwardRefExoticComponent<Omit<React.DetailedHTMLProps<React.OlHTMLAttributes<HTMLOListElement>, HTMLOListElement>, "ref"> & React.RefAttributes<HTMLOListElement>>;
|
|
6
|
+
declare const BreadcrumbItem: React.ForwardRefExoticComponent<Omit<React.DetailedHTMLProps<React.LiHTMLAttributes<HTMLLIElement>, HTMLLIElement>, "ref"> & React.RefAttributes<HTMLLIElement>>;
|
|
7
|
+
declare const BreadcrumbLink: React.ForwardRefExoticComponent<Omit<React.DetailedHTMLProps<React.AnchorHTMLAttributes<HTMLAnchorElement>, HTMLAnchorElement>, "ref"> & {
|
|
8
|
+
asChild?: boolean;
|
|
9
|
+
} & React.RefAttributes<HTMLAnchorElement>>;
|
|
10
|
+
declare const BreadcrumbBackLink: React.ForwardRefExoticComponent<Omit<React.DetailedHTMLProps<React.AnchorHTMLAttributes<HTMLAnchorElement>, HTMLAnchorElement>, "ref"> & {
|
|
11
|
+
asChild?: boolean;
|
|
12
|
+
} & React.RefAttributes<HTMLAnchorElement>>;
|
|
13
|
+
declare const BreadcrumbPage: React.ForwardRefExoticComponent<Omit<React.DetailedHTMLProps<React.HTMLAttributes<HTMLSpanElement>, HTMLSpanElement>, "ref"> & React.RefAttributes<HTMLSpanElement>>;
|
|
14
|
+
declare const BreadcrumbSeparator: {
|
|
15
|
+
({ children, className, ...props }: React.ComponentProps<"li">): import("react/jsx-runtime").JSX.Element;
|
|
16
|
+
displayName: string;
|
|
17
|
+
};
|
|
18
|
+
declare const BreadcrumbDivider: {
|
|
19
|
+
({ className, ...props }: React.ComponentProps<"div">): import("react/jsx-runtime").JSX.Element;
|
|
20
|
+
displayName: string;
|
|
21
|
+
};
|
|
22
|
+
declare const BreadcrumbEllipsis: {
|
|
23
|
+
({ className, ...props }: React.ComponentProps<"span">): import("react/jsx-runtime").JSX.Element;
|
|
24
|
+
displayName: string;
|
|
25
|
+
};
|
|
26
|
+
export { Breadcrumb, BreadcrumbList, BreadcrumbItem, BreadcrumbLink, BreadcrumbBackLink, BreadcrumbPage, BreadcrumbSeparator, BreadcrumbEllipsis, BreadcrumbDivider, };
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
import { VariantProps } from 'class-variance-authority';
|
|
3
|
+
declare const buttonVariants: (props?: ({
|
|
4
|
+
variant?: "link" | "primary" | "subtle" | "outline" | "secondary" | "danger" | "ghost" | "ghost2" | null | undefined;
|
|
5
|
+
size?: "small" | "default" | "sm" | "lg" | "icon" | null | undefined;
|
|
6
|
+
} & import('class-variance-authority/types').ClassProp) | undefined) => string;
|
|
7
|
+
export interface ButtonProps extends React.ButtonHTMLAttributes<HTMLButtonElement>, VariantProps<typeof buttonVariants> {
|
|
8
|
+
asChild?: boolean;
|
|
9
|
+
/** 按钮图标,显示在文字前面 */
|
|
10
|
+
icon?: React.ReactNode;
|
|
11
|
+
/** 加载状态,显示 Loader 并禁用按钮 */
|
|
12
|
+
loading?: boolean;
|
|
13
|
+
}
|
|
14
|
+
declare const Button: React.ForwardRefExoticComponent<ButtonProps & React.RefAttributes<HTMLButtonElement>>;
|
|
15
|
+
export { Button, buttonVariants };
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { DayPicker } from 'react-day-picker';
|
|
2
|
+
import * as React from "react";
|
|
3
|
+
export type CalendarProps = React.ComponentProps<typeof DayPicker>;
|
|
4
|
+
declare function Calendar({ classNames, showOutsideDays, ...props }: CalendarProps): import("react/jsx-runtime").JSX.Element;
|
|
5
|
+
declare namespace Calendar {
|
|
6
|
+
var displayName: string;
|
|
7
|
+
}
|
|
8
|
+
export { Calendar };
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import { VariantProps } from 'class-variance-authority';
|
|
2
|
+
import * as React from "react";
|
|
3
|
+
declare const cardVariants: (props?: ({
|
|
4
|
+
variant?: "default" | "create" | "detail" | "plain" | null | undefined;
|
|
5
|
+
} & import('class-variance-authority/types').ClassProp) | undefined) => string;
|
|
6
|
+
declare const cardContentVariants: (props?: ({
|
|
7
|
+
variant?: "default" | "create" | "detail" | "plain" | null | undefined;
|
|
8
|
+
} & import('class-variance-authority/types').ClassProp) | undefined) => string;
|
|
9
|
+
export declare function useCardContext(): {
|
|
10
|
+
isCollapsed: boolean;
|
|
11
|
+
toggleCollapse: () => void;
|
|
12
|
+
};
|
|
13
|
+
export declare function CardProvider({ children }: {
|
|
14
|
+
children: React.ReactNode;
|
|
15
|
+
}): import("react/jsx-runtime").JSX.Element;
|
|
16
|
+
export interface CardProps extends React.HTMLAttributes<HTMLDivElement>, VariantProps<typeof cardVariants> {
|
|
17
|
+
}
|
|
18
|
+
declare const Card: React.ForwardRefExoticComponent<CardProps & React.RefAttributes<HTMLDivElement>>;
|
|
19
|
+
declare const CardHeader: React.ForwardRefExoticComponent<React.HTMLAttributes<HTMLDivElement> & React.RefAttributes<HTMLDivElement>>;
|
|
20
|
+
declare const CardTitle: React.ForwardRefExoticComponent<React.HTMLAttributes<HTMLDivElement> & React.RefAttributes<HTMLDivElement>>;
|
|
21
|
+
declare const CardCollapseIndicator: React.ForwardRefExoticComponent<React.HTMLAttributes<SVGSVGElement> & React.RefAttributes<SVGSVGElement>>;
|
|
22
|
+
declare const CardDescription: React.ForwardRefExoticComponent<React.HTMLAttributes<HTMLParagraphElement> & React.RefAttributes<HTMLParagraphElement>>;
|
|
23
|
+
export interface CardContentProps extends React.HTMLAttributes<HTMLDivElement>, VariantProps<typeof cardContentVariants> {
|
|
24
|
+
}
|
|
25
|
+
declare const CardContent: React.ForwardRefExoticComponent<CardContentProps & React.RefAttributes<HTMLDivElement>>;
|
|
26
|
+
declare const CardFooter: React.ForwardRefExoticComponent<React.HTMLAttributes<HTMLDivElement> & React.RefAttributes<HTMLDivElement>>;
|
|
27
|
+
export { Card, cardVariants, CardHeader, CardFooter, CardTitle, CardDescription, CardContent, cardContentVariants, CardCollapseIndicator, };
|
|
@@ -0,0 +1,117 @@
|
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
/**
|
|
3
|
+
* Cascader 选项接口
|
|
4
|
+
*/
|
|
5
|
+
export interface CascaderOption {
|
|
6
|
+
value: string | number;
|
|
7
|
+
label: React.ReactNode;
|
|
8
|
+
disabled?: boolean;
|
|
9
|
+
children?: CascaderOption[];
|
|
10
|
+
isLeaf?: boolean;
|
|
11
|
+
searchLabel?: string;
|
|
12
|
+
}
|
|
13
|
+
/**
|
|
14
|
+
* 字段名自定义配置
|
|
15
|
+
*/
|
|
16
|
+
export interface CascaderFieldNames {
|
|
17
|
+
label?: string;
|
|
18
|
+
value?: string;
|
|
19
|
+
children?: string;
|
|
20
|
+
}
|
|
21
|
+
/**
|
|
22
|
+
* Cascader 组件属性接口 - 单选模式
|
|
23
|
+
*/
|
|
24
|
+
export interface CascaderSingleProps {
|
|
25
|
+
/** 是否多选 */
|
|
26
|
+
multiple?: false;
|
|
27
|
+
/** 当前选中的值 (单选为路径数组) */
|
|
28
|
+
value?: (string | number)[];
|
|
29
|
+
/** 默认选中的值 */
|
|
30
|
+
defaultValue?: (string | number)[];
|
|
31
|
+
/** 选择变化时的回调 */
|
|
32
|
+
onChange?: (value: (string | number)[], selectedOptions: CascaderOption[]) => void;
|
|
33
|
+
}
|
|
34
|
+
/**
|
|
35
|
+
* Cascader 组件属性接口 - 多选模式
|
|
36
|
+
*/
|
|
37
|
+
export interface CascaderMultipleProps {
|
|
38
|
+
/** 是否多选 */
|
|
39
|
+
multiple: true;
|
|
40
|
+
/** 当前选中的值 (多选为路径数组的数组) */
|
|
41
|
+
value?: (string | number)[][];
|
|
42
|
+
/** 默认选中的值 */
|
|
43
|
+
defaultValue?: (string | number)[][];
|
|
44
|
+
/** 选择变化时的回调 */
|
|
45
|
+
onChange?: (value: (string | number)[][], selectedOptions: CascaderOption[][]) => void;
|
|
46
|
+
}
|
|
47
|
+
/**
|
|
48
|
+
* Cascader 通用属性接口
|
|
49
|
+
*/
|
|
50
|
+
export interface CascaderBaseProps {
|
|
51
|
+
/** 可选项数据源 */
|
|
52
|
+
options: CascaderOption[];
|
|
53
|
+
/** 占位符 */
|
|
54
|
+
placeholder?: string;
|
|
55
|
+
/** 是否禁用 */
|
|
56
|
+
disabled?: boolean;
|
|
57
|
+
/** 是否支持清除 */
|
|
58
|
+
allowClear?: boolean;
|
|
59
|
+
/** 是否显示搜索框 */
|
|
60
|
+
showSearch?: boolean;
|
|
61
|
+
/** 搜索框占位符 */
|
|
62
|
+
searchPlaceholder?: string;
|
|
63
|
+
/** 展开触发方式 */
|
|
64
|
+
expandTrigger?: "click" | "hover";
|
|
65
|
+
/** 自定义显示渲染函数 */
|
|
66
|
+
displayRender?: (labels: React.ReactNode[], selectedOptions: CascaderOption[]) => React.ReactNode;
|
|
67
|
+
/** 动态加载数据 */
|
|
68
|
+
loadData?: (selectedOptions: CascaderOption[]) => Promise<void>;
|
|
69
|
+
/** 自定义类名 */
|
|
70
|
+
className?: string;
|
|
71
|
+
/** 下拉面板自定义类名 */
|
|
72
|
+
dropdownClassName?: string;
|
|
73
|
+
/** 空状态内容 */
|
|
74
|
+
notFoundContent?: React.ReactNode;
|
|
75
|
+
/** 是否可以选择父节点 */
|
|
76
|
+
changeOnSelect?: boolean;
|
|
77
|
+
/** 自定义字段名 */
|
|
78
|
+
fieldNames?: CascaderFieldNames;
|
|
79
|
+
/** 清除时的回调 */
|
|
80
|
+
onClear?: () => void;
|
|
81
|
+
/** 自定义 z-index */
|
|
82
|
+
zIndex?: number;
|
|
83
|
+
/** 是否禁用自动 z-index 管理 */
|
|
84
|
+
disableAutoZIndex?: boolean;
|
|
85
|
+
/** 控制哪些选项显示复选框(多选模式),默认所有选项都显示 */
|
|
86
|
+
checkable?: boolean | ((option: CascaderOption, level: number) => boolean);
|
|
87
|
+
/** 下拉框打开/关闭时的回调 */
|
|
88
|
+
onOpenChange?: (open: boolean) => void;
|
|
89
|
+
}
|
|
90
|
+
export type CascaderProps = CascaderBaseProps & (CascaderSingleProps | CascaderMultipleProps);
|
|
91
|
+
/**
|
|
92
|
+
* Cascader 级联选择器组件
|
|
93
|
+
*
|
|
94
|
+
* 支持多级级联选择,可配置为点击或悬停展开下一级
|
|
95
|
+
*
|
|
96
|
+
* @example
|
|
97
|
+
* ```tsx
|
|
98
|
+
* // 单选模式
|
|
99
|
+
* <Cascader
|
|
100
|
+
* options={options}
|
|
101
|
+
* value={['beijing', 'chaoyang']}
|
|
102
|
+
* onChange={(value, options) => console.log(value)}
|
|
103
|
+
* placeholder="请选择地区"
|
|
104
|
+
* />
|
|
105
|
+
*
|
|
106
|
+
* // 多选模式
|
|
107
|
+
* <Cascader
|
|
108
|
+
* multiple
|
|
109
|
+
* options={options}
|
|
110
|
+
* value={[['beijing', 'chaoyang'], ['shanghai', 'pudong']]}
|
|
111
|
+
* onChange={(value, options) => console.log(value)}
|
|
112
|
+
* placeholder="请选择地区"
|
|
113
|
+
* />
|
|
114
|
+
* ```
|
|
115
|
+
*/
|
|
116
|
+
export declare const Cascader: React.ForwardRefExoticComponent<CascaderProps & React.RefAttributes<HTMLButtonElement>>;
|
|
117
|
+
export default Cascader;
|
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
import * as RechartsPrimitive from "recharts";
|
|
3
|
+
declare const THEMES: {
|
|
4
|
+
readonly light: "";
|
|
5
|
+
readonly dark: ".dark";
|
|
6
|
+
};
|
|
7
|
+
export type ChartConfig = {
|
|
8
|
+
[k in string]: {
|
|
9
|
+
label?: React.ReactNode;
|
|
10
|
+
icon?: React.ComponentType;
|
|
11
|
+
} & ({
|
|
12
|
+
color?: string;
|
|
13
|
+
theme?: never;
|
|
14
|
+
} | {
|
|
15
|
+
color?: never;
|
|
16
|
+
theme: Record<keyof typeof THEMES, string>;
|
|
17
|
+
});
|
|
18
|
+
};
|
|
19
|
+
declare const ChartContainer: React.ForwardRefExoticComponent<Omit<React.ClassAttributes<HTMLDivElement> & React.HTMLAttributes<HTMLDivElement> & {
|
|
20
|
+
config: ChartConfig;
|
|
21
|
+
children: React.ComponentProps<typeof RechartsPrimitive.ResponsiveContainer>["children"];
|
|
22
|
+
}, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
23
|
+
declare const ChartStyle: ({ id, config }: {
|
|
24
|
+
id: string;
|
|
25
|
+
config: ChartConfig;
|
|
26
|
+
}) => import("react/jsx-runtime").JSX.Element | null;
|
|
27
|
+
declare const ChartTooltip: typeof RechartsPrimitive.Tooltip;
|
|
28
|
+
declare const ChartTooltipContent: React.ForwardRefExoticComponent<Omit<RechartsPrimitive.DefaultTooltipContentProps<import('recharts/types/component/DefaultTooltipContent').ValueType, import('recharts/types/component/DefaultTooltipContent').NameType> & {
|
|
29
|
+
accessibilityLayer?: boolean;
|
|
30
|
+
active?: boolean | undefined;
|
|
31
|
+
includeHidden?: boolean | undefined;
|
|
32
|
+
allowEscapeViewBox?: import('recharts/types/util/types').AllowInDimension;
|
|
33
|
+
animationDuration?: import('recharts/types/util/types').AnimationDuration;
|
|
34
|
+
animationEasing?: import('recharts/types/util/types').AnimationTiming;
|
|
35
|
+
content?: import('recharts/types/component/Tooltip').ContentType<import('recharts/types/component/DefaultTooltipContent').ValueType, import('recharts/types/component/DefaultTooltipContent').NameType> | undefined;
|
|
36
|
+
coordinate?: Partial<import('recharts/types/util/types').Coordinate>;
|
|
37
|
+
cursor?: boolean | React.ReactElement | React.SVGProps<SVGElement>;
|
|
38
|
+
filterNull?: boolean;
|
|
39
|
+
defaultIndex?: number;
|
|
40
|
+
isAnimationActive?: boolean;
|
|
41
|
+
offset?: number;
|
|
42
|
+
payloadUniqBy?: import('recharts/types/util/payload/getUniqPayload').UniqueOption<import('recharts/types/component/DefaultTooltipContent').Payload<import('recharts/types/component/DefaultTooltipContent').ValueType, import('recharts/types/component/DefaultTooltipContent').NameType>> | undefined;
|
|
43
|
+
position?: Partial<import('recharts/types/util/types').Coordinate>;
|
|
44
|
+
reverseDirection?: import('recharts/types/util/types').AllowInDimension;
|
|
45
|
+
shared?: boolean;
|
|
46
|
+
trigger?: "hover" | "click";
|
|
47
|
+
useTranslate3d?: boolean;
|
|
48
|
+
viewBox?: import('recharts/types/util/types').CartesianViewBox;
|
|
49
|
+
wrapperStyle?: React.CSSProperties;
|
|
50
|
+
} & React.ClassAttributes<HTMLDivElement> & React.HTMLAttributes<HTMLDivElement> & {
|
|
51
|
+
hideLabel?: boolean;
|
|
52
|
+
hideIndicator?: boolean;
|
|
53
|
+
indicator?: "line" | "dot" | "dashed";
|
|
54
|
+
nameKey?: string;
|
|
55
|
+
labelKey?: string;
|
|
56
|
+
}, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
57
|
+
declare const ChartLegend: typeof RechartsPrimitive.Legend;
|
|
58
|
+
declare const ChartLegendContent: React.ForwardRefExoticComponent<Omit<React.ClassAttributes<HTMLDivElement> & React.HTMLAttributes<HTMLDivElement> & Pick<RechartsPrimitive.LegendProps, "payload" | "verticalAlign"> & {
|
|
59
|
+
hideIcon?: boolean;
|
|
60
|
+
nameKey?: string;
|
|
61
|
+
}, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
62
|
+
export { ChartContainer, ChartTooltip, ChartTooltipContent, ChartLegend, ChartLegendContent, ChartStyle, };
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
export type CheckboxGroupItem = {
|
|
3
|
+
label: React.ReactNode;
|
|
4
|
+
value: string;
|
|
5
|
+
tooltip?: React.ReactNode;
|
|
6
|
+
disabled?: boolean;
|
|
7
|
+
};
|
|
8
|
+
interface CheckboxGroupProps {
|
|
9
|
+
items: CheckboxGroupItem[];
|
|
10
|
+
value: string[];
|
|
11
|
+
onChange: (value: string[]) => void;
|
|
12
|
+
}
|
|
13
|
+
declare const CheckboxGroup: (props: CheckboxGroupProps) => import("react/jsx-runtime").JSX.Element;
|
|
14
|
+
export { CheckboxGroup };
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
import * as CheckboxPrimitive from "@radix-ui/react-checkbox";
|
|
3
|
+
export interface CheckboxProps extends React.ComponentPropsWithoutRef<typeof CheckboxPrimitive.Root> {
|
|
4
|
+
indeterminate?: boolean;
|
|
5
|
+
}
|
|
6
|
+
declare const Checkbox: React.ForwardRefExoticComponent<CheckboxProps & React.RefAttributes<HTMLButtonElement>>;
|
|
7
|
+
export { Checkbox };
|
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
import { ReactCodeMirrorProps } from '@uiw/react-codemirror';
|
|
2
|
+
import { langs } from '@uiw/codemirror-extensions-langs';
|
|
3
|
+
import * as React from "react";
|
|
4
|
+
export type SupportedLanguage = keyof typeof langs;
|
|
5
|
+
interface CodeEditorContextValue {
|
|
6
|
+
language: SupportedLanguage;
|
|
7
|
+
code: string;
|
|
8
|
+
setCode: (code: string) => void;
|
|
9
|
+
isFullscreen: boolean;
|
|
10
|
+
setIsFullscreen: (value: boolean) => void;
|
|
11
|
+
id: string;
|
|
12
|
+
editable: boolean;
|
|
13
|
+
placeholder?: string | HTMLElement;
|
|
14
|
+
}
|
|
15
|
+
export declare const useCodeEditor: () => CodeEditorContextValue;
|
|
16
|
+
export interface CodeEditorProps extends Omit<ReactCodeMirrorProps, "extensions" | "value" | "onChange"> {
|
|
17
|
+
/** 支持的语言,默认 javascript */
|
|
18
|
+
language?: SupportedLanguage;
|
|
19
|
+
variant?: "default";
|
|
20
|
+
size?: "sm" | "md" | "lg";
|
|
21
|
+
/** 渲染的文本代码 */
|
|
22
|
+
value?: string;
|
|
23
|
+
onChange?: (value: string) => void;
|
|
24
|
+
/** 是否全屏模式,用于受控模式 */
|
|
25
|
+
isFullscreen?: boolean;
|
|
26
|
+
/** 全屏状态变化的回调,用于受控模式 */
|
|
27
|
+
onFullscreenChange?: (isFullscreen: boolean) => void;
|
|
28
|
+
additionalExtensions?: ReactCodeMirrorProps["extensions"];
|
|
29
|
+
className?: string;
|
|
30
|
+
/** 是否可编辑 */
|
|
31
|
+
editable?: boolean;
|
|
32
|
+
/** 是否自动换行,默认 false */
|
|
33
|
+
lineWrapping?: boolean;
|
|
34
|
+
}
|
|
35
|
+
export interface CodeEditorComposition {
|
|
36
|
+
Toolbar: typeof CodeEditorToolbar & {
|
|
37
|
+
Button: typeof ToolbarButton;
|
|
38
|
+
};
|
|
39
|
+
FullscreenPreview: typeof CodeEditorFullscreenPreview;
|
|
40
|
+
}
|
|
41
|
+
export declare const CodeEditor: React.FC<CodeEditorProps> & CodeEditorComposition;
|
|
42
|
+
interface CodeEditorToolbarType extends React.FC<CodeEditorToolbarProps> {
|
|
43
|
+
Button: typeof ToolbarButton;
|
|
44
|
+
}
|
|
45
|
+
interface CodeEditorToolbarProps {
|
|
46
|
+
children: React.ReactNode;
|
|
47
|
+
className?: string;
|
|
48
|
+
}
|
|
49
|
+
declare const CodeEditorToolbar: CodeEditorToolbarType;
|
|
50
|
+
interface ToolbarButtonProps extends React.ButtonHTMLAttributes<SVGElement> {
|
|
51
|
+
variant: "fullscreen";
|
|
52
|
+
active?: boolean;
|
|
53
|
+
className?: string;
|
|
54
|
+
}
|
|
55
|
+
declare const ToolbarButton: React.FC<ToolbarButtonProps>;
|
|
56
|
+
interface CodeEditorFullscreenPreviewProps {
|
|
57
|
+
/** 弹窗标题 */
|
|
58
|
+
title: React.ReactNode;
|
|
59
|
+
/** 是否打开全屏预览,不提供则使用内部状态 */
|
|
60
|
+
open?: boolean;
|
|
61
|
+
/** 打开状态变化的回调 */
|
|
62
|
+
onOpenChange?: (open: boolean) => void;
|
|
63
|
+
/** 底部确认按钮文案 */
|
|
64
|
+
confirmText?: string;
|
|
65
|
+
}
|
|
66
|
+
declare const CodeEditorFullscreenPreview: React.FC<CodeEditorFullscreenPreviewProps>;
|
|
67
|
+
export default CodeEditor;
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
export declare function useCollapseContext(): {
|
|
3
|
+
isExpanded: boolean;
|
|
4
|
+
toggleExpand: () => void;
|
|
5
|
+
};
|
|
6
|
+
declare const Collapse: React.ForwardRefExoticComponent<React.HTMLAttributes<HTMLDivElement> & React.RefAttributes<HTMLDivElement>>;
|
|
7
|
+
interface CollapseItemProps extends React.HTMLAttributes<HTMLDivElement> {
|
|
8
|
+
expanded?: boolean;
|
|
9
|
+
onExpandedChange?: (expanded: boolean) => void;
|
|
10
|
+
}
|
|
11
|
+
declare const CollapseItem: React.ForwardRefExoticComponent<CollapseItemProps & React.RefAttributes<HTMLDivElement>>;
|
|
12
|
+
declare const CollapseTrigger: React.ForwardRefExoticComponent<React.HTMLAttributes<HTMLDivElement> & React.RefAttributes<HTMLDivElement>>;
|
|
13
|
+
interface CollapseContentProps extends React.HTMLAttributes<HTMLDivElement> {
|
|
14
|
+
forceRender?: boolean;
|
|
15
|
+
}
|
|
16
|
+
declare const CollapseContent: React.ForwardRefExoticComponent<CollapseContentProps & React.RefAttributes<HTMLDivElement>>;
|
|
17
|
+
export { Collapse, CollapseItem, CollapseTrigger, CollapseContent, type CollapseContentProps, };
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
import * as ContextMenuPrimitive from "@radix-ui/react-context-menu";
|
|
3
|
+
declare const ContextMenu: React.FC<ContextMenuPrimitive.ContextMenuProps>;
|
|
4
|
+
declare const ContextMenuTrigger: React.ForwardRefExoticComponent<ContextMenuPrimitive.ContextMenuTriggerProps & React.RefAttributes<HTMLSpanElement>>;
|
|
5
|
+
declare const ContextMenuGroup: React.ForwardRefExoticComponent<ContextMenuPrimitive.ContextMenuGroupProps & React.RefAttributes<HTMLDivElement>>;
|
|
6
|
+
declare const ContextMenuPortal: React.FC<ContextMenuPrimitive.ContextMenuPortalProps>;
|
|
7
|
+
declare const ContextMenuSub: React.FC<ContextMenuPrimitive.ContextMenuSubProps>;
|
|
8
|
+
declare const ContextMenuRadioGroup: React.ForwardRefExoticComponent<ContextMenuPrimitive.ContextMenuRadioGroupProps & React.RefAttributes<HTMLDivElement>>;
|
|
9
|
+
declare const ContextMenuSubTrigger: React.ForwardRefExoticComponent<Omit<ContextMenuPrimitive.ContextMenuSubTriggerProps & React.RefAttributes<HTMLDivElement>, "ref"> & {
|
|
10
|
+
inset?: boolean;
|
|
11
|
+
} & React.RefAttributes<HTMLDivElement>>;
|
|
12
|
+
declare const ContextMenuSubContent: React.ForwardRefExoticComponent<Omit<ContextMenuPrimitive.ContextMenuSubContentProps & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
13
|
+
interface ContextMenuContentProps extends React.ComponentPropsWithoutRef<typeof ContextMenuPrimitive.Content> {
|
|
14
|
+
open?: boolean;
|
|
15
|
+
zIndex?: number;
|
|
16
|
+
disableAutoZIndex?: boolean;
|
|
17
|
+
}
|
|
18
|
+
declare const ContextMenuContent: React.ForwardRefExoticComponent<ContextMenuContentProps & React.RefAttributes<HTMLDivElement>>;
|
|
19
|
+
declare const ContextMenuItem: React.ForwardRefExoticComponent<Omit<ContextMenuPrimitive.ContextMenuItemProps & React.RefAttributes<HTMLDivElement>, "ref"> & {
|
|
20
|
+
inset?: boolean;
|
|
21
|
+
} & React.RefAttributes<HTMLDivElement>>;
|
|
22
|
+
declare const ContextMenuCheckboxItem: React.ForwardRefExoticComponent<Omit<ContextMenuPrimitive.ContextMenuCheckboxItemProps & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
23
|
+
declare const ContextMenuRadioItem: React.ForwardRefExoticComponent<Omit<ContextMenuPrimitive.ContextMenuRadioItemProps & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
24
|
+
declare const ContextMenuLabel: React.ForwardRefExoticComponent<Omit<ContextMenuPrimitive.ContextMenuLabelProps & React.RefAttributes<HTMLDivElement>, "ref"> & {
|
|
25
|
+
inset?: boolean;
|
|
26
|
+
} & React.RefAttributes<HTMLDivElement>>;
|
|
27
|
+
declare const ContextMenuSeparator: React.ForwardRefExoticComponent<Omit<ContextMenuPrimitive.ContextMenuSeparatorProps & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
28
|
+
declare const ContextMenuShortcut: {
|
|
29
|
+
({ className, ...props }: React.HTMLAttributes<HTMLSpanElement>): import("react/jsx-runtime").JSX.Element;
|
|
30
|
+
displayName: string;
|
|
31
|
+
};
|
|
32
|
+
interface ContextMenuItem {
|
|
33
|
+
key: string | number;
|
|
34
|
+
label?: React.ReactNode;
|
|
35
|
+
disabled?: boolean;
|
|
36
|
+
tooltip?: React.ReactNode;
|
|
37
|
+
type?: "item" | "group" | "separator";
|
|
38
|
+
children?: ContextMenuItem[];
|
|
39
|
+
[key: string]: unknown;
|
|
40
|
+
}
|
|
41
|
+
interface ContextMenuSimpleProps {
|
|
42
|
+
items: ContextMenuItem[];
|
|
43
|
+
children: React.ReactNode;
|
|
44
|
+
onSelect: (event: ContextMenuItem) => void;
|
|
45
|
+
className?: string;
|
|
46
|
+
}
|
|
47
|
+
declare const ContextMenuSimple: (props: ContextMenuSimpleProps) => import("react/jsx-runtime").JSX.Element;
|
|
48
|
+
export { ContextMenu, ContextMenuTrigger, ContextMenuContent, ContextMenuItem, ContextMenuCheckboxItem, ContextMenuRadioItem, ContextMenuLabel, ContextMenuSeparator, ContextMenuShortcut, ContextMenuGroup, ContextMenuPortal, ContextMenuSub, ContextMenuSubContent, ContextMenuSubTrigger, ContextMenuRadioGroup, ContextMenuSimple, type ContextMenuSimpleProps, type ContextMenuItem as ContextMenuItemType, };
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
import { PopoverPortal } from '@radix-ui/react-popover';
|
|
2
|
+
import * as React from "react";
|
|
3
|
+
export interface DisabledTimeConfig {
|
|
4
|
+
disabledHours?: () => number[];
|
|
5
|
+
disabledMinutes?: () => number[];
|
|
6
|
+
disabledSeconds?: () => number[];
|
|
7
|
+
}
|
|
8
|
+
export interface DatePickerProps {
|
|
9
|
+
/** 当前值 — 支持 Date / Moment-like / undefined */
|
|
10
|
+
value?: unknown;
|
|
11
|
+
/** 值变更回调,返回类型与输入类型一致 */
|
|
12
|
+
onChange?: (val: unknown) => void;
|
|
13
|
+
/**
|
|
14
|
+
* 首次选择时用于创建初始值的工厂函数。
|
|
15
|
+
* 传入 `() => moment()` 即可让返回值始终是 moment 对象。
|
|
16
|
+
*/
|
|
17
|
+
createValue?: () => unknown;
|
|
18
|
+
/** 是否显示时间选择面板 */
|
|
19
|
+
showTime?: boolean;
|
|
20
|
+
/** 是否显示「此刻」按钮 */
|
|
21
|
+
showNow?: boolean;
|
|
22
|
+
/** 日期禁用判断(接收 Date 对象) */
|
|
23
|
+
disabledDate?: (date: Date) => boolean;
|
|
24
|
+
/** 时间禁用配置(接收 Date 对象) */
|
|
25
|
+
disabledTime?: (date: Date) => DisabledTimeConfig;
|
|
26
|
+
/** 占位文本 */
|
|
27
|
+
placeholder?: string;
|
|
28
|
+
/** 显示格式 — 仅用于 trigger 文本展示 */
|
|
29
|
+
format?: string;
|
|
30
|
+
/** 禁用 */
|
|
31
|
+
disabled?: boolean;
|
|
32
|
+
/** 允许清除 */
|
|
33
|
+
allowClear?: boolean;
|
|
34
|
+
/** 自定义 className */
|
|
35
|
+
className?: string;
|
|
36
|
+
/** 宽度 */
|
|
37
|
+
width?: number | string;
|
|
38
|
+
/** Popover portal props */
|
|
39
|
+
popoverPortalProps?: React.ComponentPropsWithoutRef<typeof PopoverPortal>;
|
|
40
|
+
}
|
|
41
|
+
export declare function DatePicker({ value, onChange, createValue, showTime, showNow, disabledDate, disabledTime, placeholder, format: _format, disabled, allowClear, className, width, popoverPortalProps, }: DatePickerProps): import("react/jsx-runtime").JSX.Element;
|
|
42
|
+
export declare namespace DatePicker {
|
|
43
|
+
var displayName: string;
|
|
44
|
+
}
|
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
import { VariantProps } from 'class-variance-authority';
|
|
2
|
+
import { DialogProps } from '@radix-ui/react-dialog';
|
|
3
|
+
import * as React from "react";
|
|
4
|
+
import * as DialogPrimitive from "@radix-ui/react-dialog";
|
|
5
|
+
declare const Dialog: React.FC<DialogProps>;
|
|
6
|
+
declare const DialogTrigger: React.ForwardRefExoticComponent<DialogPrimitive.DialogTriggerProps & React.RefAttributes<HTMLButtonElement>>;
|
|
7
|
+
declare const DialogPortal: React.FC<DialogPrimitive.DialogPortalProps>;
|
|
8
|
+
declare const DialogClose: React.ForwardRefExoticComponent<DialogPrimitive.DialogCloseProps & React.RefAttributes<HTMLButtonElement>>;
|
|
9
|
+
declare const DialogOverlay: React.ForwardRefExoticComponent<Omit<DialogPrimitive.DialogOverlayProps & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
10
|
+
export interface DialogContentProps extends React.ComponentPropsWithoutRef<typeof DialogPrimitive.Content> {
|
|
11
|
+
zIndex?: number;
|
|
12
|
+
dialogPortalProps?: React.ComponentPropsWithoutRef<typeof DialogPortal>;
|
|
13
|
+
disableAutoZIndex?: boolean;
|
|
14
|
+
}
|
|
15
|
+
declare const DialogContent: React.ForwardRefExoticComponent<DialogContentProps & React.RefAttributes<HTMLDivElement>>;
|
|
16
|
+
declare const dialogHeaderVariants: (props?: ({
|
|
17
|
+
variant?: "primary" | "secondary" | null | undefined;
|
|
18
|
+
} & import('class-variance-authority/types').ClassProp) | undefined) => string;
|
|
19
|
+
export interface DialogHeaderProps extends React.HTMLAttributes<HTMLDivElement>, VariantProps<typeof dialogHeaderVariants> {
|
|
20
|
+
}
|
|
21
|
+
declare const DialogHeader: {
|
|
22
|
+
({ className, variant, ...props }: DialogHeaderProps): import("react/jsx-runtime").JSX.Element;
|
|
23
|
+
displayName: string;
|
|
24
|
+
};
|
|
25
|
+
declare const dialogFooterVariants: (props?: ({
|
|
26
|
+
variant?: "primary" | "secondary" | null | undefined;
|
|
27
|
+
} & import('class-variance-authority/types').ClassProp) | undefined) => string;
|
|
28
|
+
export interface DialogFooterProps extends React.HTMLAttributes<HTMLDivElement>, VariantProps<typeof dialogFooterVariants> {
|
|
29
|
+
}
|
|
30
|
+
declare const DialogFooter: {
|
|
31
|
+
({ className, variant, ...props }: DialogFooterProps): import("react/jsx-runtime").JSX.Element;
|
|
32
|
+
displayName: string;
|
|
33
|
+
};
|
|
34
|
+
declare const dialogTitleVariants: (props?: ({
|
|
35
|
+
variant?: "normal" | "weak" | null | undefined;
|
|
36
|
+
} & import('class-variance-authority/types').ClassProp) | undefined) => string;
|
|
37
|
+
export interface DialogTitleProps extends React.ComponentPropsWithoutRef<typeof DialogPrimitive.Title>, VariantProps<typeof dialogTitleVariants> {
|
|
38
|
+
}
|
|
39
|
+
declare const DialogTitle: React.ForwardRefExoticComponent<DialogTitleProps & React.RefAttributes<HTMLHeadingElement>>;
|
|
40
|
+
declare const DialogDescription: React.ForwardRefExoticComponent<Omit<DialogPrimitive.DialogDescriptionProps & React.RefAttributes<HTMLParagraphElement>, "ref"> & React.RefAttributes<HTMLParagraphElement>>;
|
|
41
|
+
declare const dialogBannerVariants: (props?: ({
|
|
42
|
+
variant?: "danger" | "warning" | "info" | null | undefined;
|
|
43
|
+
} & import('class-variance-authority/types').ClassProp) | undefined) => string;
|
|
44
|
+
export interface DialogBannerProps extends React.HTMLAttributes<HTMLDivElement>, VariantProps<typeof dialogBannerVariants> {
|
|
45
|
+
children: React.ReactNode;
|
|
46
|
+
}
|
|
47
|
+
declare const DialogBanner: ({ children, variant, className, ...props }: DialogBannerProps) => import("react/jsx-runtime").JSX.Element;
|
|
48
|
+
export type DialogDividerProps = React.HTMLAttributes<HTMLDivElement>;
|
|
49
|
+
declare const DialogDivider: ({ ...props }: DialogDividerProps) => import("react/jsx-runtime").JSX.Element;
|
|
50
|
+
export interface DialogScrollAreaProps extends React.HTMLAttributes<HTMLDivElement> {
|
|
51
|
+
children: React.ReactNode;
|
|
52
|
+
}
|
|
53
|
+
declare const DialogScrollArea: ({ className, children, ...props }: DialogScrollAreaProps) => import("react/jsx-runtime").JSX.Element;
|
|
54
|
+
declare const dialogBodyVariants: (props?: ({
|
|
55
|
+
variant?: "primary" | "secondary" | null | undefined;
|
|
56
|
+
} & import('class-variance-authority/types').ClassProp) | undefined) => string;
|
|
57
|
+
export interface DialogBodyProps extends React.HTMLAttributes<HTMLDivElement>, VariantProps<typeof dialogBodyVariants> {
|
|
58
|
+
children: React.ReactNode;
|
|
59
|
+
}
|
|
60
|
+
declare const DialogBody: ({ children, variant, className }: DialogBodyProps) => import("react/jsx-runtime").JSX.Element;
|
|
61
|
+
export interface DialogHeaderLargeProps {
|
|
62
|
+
title: string;
|
|
63
|
+
setVisible: (visible: boolean) => void;
|
|
64
|
+
}
|
|
65
|
+
declare const DialogHeaderLarge: ({ title, setVisible }: DialogHeaderLargeProps) => import("react/jsx-runtime").JSX.Element;
|
|
66
|
+
export { Dialog, DialogPortal, DialogOverlay, DialogClose, DialogTrigger, DialogContent, DialogHeader, DialogHeaderLarge, DialogFooter, DialogTitle, DialogDescription, DialogBanner, DialogDivider, DialogBody, DialogScrollArea, };
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
import { VariantProps } from 'class-variance-authority';
|
|
3
|
+
declare const dividerVariants: (props?: ({
|
|
4
|
+
type?: "horizontal" | "vertical" | null | undefined;
|
|
5
|
+
dashed?: boolean | null | undefined;
|
|
6
|
+
orientation?: "center" | "left" | "right" | null | undefined;
|
|
7
|
+
withText?: boolean | null | undefined;
|
|
8
|
+
plain?: boolean | null | undefined;
|
|
9
|
+
} & import('class-variance-authority/types').ClassProp) | undefined) => string;
|
|
10
|
+
export interface DividerProps extends React.HTMLAttributes<HTMLDivElement>, VariantProps<typeof dividerVariants> {
|
|
11
|
+
children?: React.ReactNode;
|
|
12
|
+
}
|
|
13
|
+
declare const Divider: React.ForwardRefExoticComponent<DividerProps & React.RefAttributes<HTMLDivElement>>;
|
|
14
|
+
export { Divider, dividerVariants };
|