@cloudtower/eagle 0.32.30 → 0.32.32

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.
Files changed (29) hide show
  1. package/dist/cjs/core/BitPerSecond/index.js +3 -3
  2. package/dist/cjs/coreX/CheckPointList/checkpointlist.style.js +9 -0
  3. package/dist/cjs/coreX/CheckPointList/index.js +90 -0
  4. package/dist/cjs/coreX/InfoRowList/InfoRow.js +31 -0
  5. package/dist/cjs/coreX/InfoRowList/InfoRowList.js +60 -0
  6. package/dist/cjs/index.js +44 -39
  7. package/dist/cjs/stats1.html +1 -1
  8. package/dist/components.css +4035 -3875
  9. package/dist/esm/core/BitPerSecond/index.js +3 -3
  10. package/dist/esm/coreX/CheckPointList/checkpointlist.style.js +5 -0
  11. package/dist/esm/coreX/CheckPointList/index.js +83 -0
  12. package/dist/esm/coreX/InfoRowList/InfoRow.js +25 -0
  13. package/dist/esm/coreX/InfoRowList/InfoRowList.js +54 -0
  14. package/dist/esm/index.js +3 -1
  15. package/dist/esm/stats1.html +1 -1
  16. package/dist/src/core/Alert/alert.type.d.ts +5 -4
  17. package/dist/src/core/BitPerSecond/index.d.ts +2 -2
  18. package/dist/src/coreX/CheckPointList/checkpointlist.style.d.ts +3 -0
  19. package/dist/src/coreX/CheckPointList/checkpointlist.type.d.ts +93 -0
  20. package/dist/src/coreX/CheckPointList/index.d.ts +8 -0
  21. package/dist/src/coreX/InfoRowList/InfoRow.d.ts +7 -0
  22. package/dist/src/coreX/InfoRowList/InfoRowList.d.ts +3 -0
  23. package/dist/src/coreX/InfoRowList/InfoRowList.type.d.ts +63 -0
  24. package/dist/src/coreX/InfoRowList/index.d.ts +1 -0
  25. package/dist/src/coreX/index.d.ts +5 -3
  26. package/dist/stories/docs/coreX/CheckPointList.stories.d.ts +67 -0
  27. package/dist/stories/docs/coreX/InfoRowList.stories.d.ts +36 -0
  28. package/dist/style.css +4021 -3883
  29. package/package.json +4 -4
@@ -1,6 +1,7 @@
1
1
  /// <reference types="react" />
2
- import { AlertProps } from "antd/lib/alert";
3
- export type AlertComponentType = React.FunctionComponent<Omit<AlertProps, "type"> & {
4
- type?: AlertProps["type"] | "normal";
2
+ import { AlertProps as AntdAlertProps } from "antd/lib/alert";
3
+ export type AlertProps = Omit<AntdAlertProps, "type"> & {
4
+ type?: AntdAlertProps["type"] | "normal";
5
5
  action?: React.ReactNode;
6
- }>;
6
+ };
7
+ export type AlertComponentType = React.FunctionComponent<AlertProps>;
@@ -1,3 +1,3 @@
1
1
  import { UnitFn } from "../Units/units.type";
2
- declare const BitPerSeconds: UnitFn;
3
- export default BitPerSeconds;
2
+ declare const BitPerSecond: UnitFn;
3
+ export default BitPerSecond;
@@ -0,0 +1,3 @@
1
+ export declare const CheckPointListStyle: import("@linaria/core").LinariaClassName;
2
+ export declare const CheckPointItemStyle: import("@linaria/core").LinariaClassName;
3
+ export declare const EmptyWrapper: import("@linaria/core").LinariaClassName;
@@ -0,0 +1,93 @@
1
+ import { AlertProps } from "../../core/Alert";
2
+ import { TagProps } from "../../core/Tag";
3
+ import React from "react";
4
+ /**
5
+ * 检查点项的属性
6
+ * @property {React.ReactNode} description - 检查点项的描述文本,用于展示检查内容,支持传入 React 节点
7
+ * @property {'success' | 'failed' | 'loading' | 'warning'} status - 检查点状态,success 表示通过,failed 表示失败,loading 表示加载中,warning 表示警告
8
+ * @property {TagProps} [tagProps] - 标签的自定义属性,可以自定义标签的颜色、图标等
9
+ * @property {AlertProps} [alertProps] - 警告组件的自定义属性,用于展示失败信息及其样式
10
+ * @example
11
+ * {
12
+ * description: "存储空间检查",
13
+ * status: "success",
14
+ * tagProps: {
15
+ * color: "green",
16
+ * children: "通过"
17
+ * }
18
+ * }
19
+ * @example
20
+ * {
21
+ * description: <span>网络连接检查 <b>(重要)</b></span>,
22
+ * status: "failed",
23
+ * tagProps: {
24
+ * color: "red",
25
+ * children: "失败"
26
+ * },
27
+ * alertProps: {
28
+ * message: "网络连接失败",
29
+ * type: "error"
30
+ * }
31
+ * }
32
+ */
33
+ export interface CheckPointItem {
34
+ description: React.ReactNode;
35
+ status: "success" | "failed" | "loading" | "warning";
36
+ tagProps?: TagProps;
37
+ alertProps?: AlertProps;
38
+ }
39
+ /**
40
+ * 检查点列表的属性
41
+ * @property {CheckPointItem[]} items - 检查点列表的项,包含检查项的描述、状态等信息
42
+ * @property {boolean} [showSwitchControl=true] - 是否显示切换控制来过滤未通过的项
43
+ * @property {(checked: boolean) => void} [onClickSwitch] - 切换开关时的回调函数
44
+ * @property {string | React.ReactNode} title - 自定义检查点列表的标题
45
+ * @property {string} [switchText] - 自定义开关按钮的文本描述
46
+ * @property {string | React.ReactNode} [emptyText] - 列表为空时显示的文本
47
+ * @property {string} [emptyTextClassName] - 空状态文本的自定义类名
48
+ * @property {(emptyText: string | React.ReactNode) => React.ReactNode} [emptyRender] - 自定义渲染空状态的函数
49
+ * @example
50
+ * {
51
+ * title: "系统检查项",
52
+ * items: [
53
+ * {
54
+ * description: "存储空间检查",
55
+ * status: "success",
56
+ * tagProps: { color: "green", children: "通过" }
57
+ * },
58
+ * {
59
+ * description: "权限检查",
60
+ * status: "failed",
61
+ * tagProps: { color: "red", children: "失败" },
62
+ * alertProps: { message: "当前用户没有管理员权限", type: "error" }
63
+ * }
64
+ * ],
65
+ * showSwitchControl: true,
66
+ * switchText: "只显示失败项"
67
+ * }
68
+ * @example
69
+ * {
70
+ * title: "系统检查项",
71
+ * items: [],
72
+ * emptyText: "暂无检查项",
73
+ * emptyTextClassName: "custom-empty-class"
74
+ * }
75
+ */
76
+ export interface CheckPointListProps {
77
+ items: CheckPointItem[];
78
+ emptyText?: string | React.ReactNode;
79
+ emptyTextClassName?: string;
80
+ emptyRender?: (emptyText: string | React.ReactNode) => React.ReactNode;
81
+ showSwitchControl?: boolean;
82
+ onClickSwitch?: (checked: boolean) => void;
83
+ title: string | React.ReactNode;
84
+ switchText?: string;
85
+ }
86
+ /**
87
+ * CheckPointItem 组件的属性
88
+ * @extends CheckPointItem
89
+ * @property {string} [key] - React 列表项的唯一标识符
90
+ */
91
+ export interface CheckPointItemProps extends CheckPointItem {
92
+ key?: string;
93
+ }
@@ -0,0 +1,8 @@
1
+ import React from "react";
2
+ import { CheckPointListProps, CheckPointItemProps } from "./checkpointlist.type";
3
+ export declare const CheckPointItem: React.FC<CheckPointItemProps>;
4
+ /**
5
+ * CheckPointList displays a list of checkpoint items with filtering capability
6
+ */
7
+ export declare const CheckPointList: React.FC<CheckPointListProps>;
8
+ export * from "./checkpointlist.type";
@@ -0,0 +1,7 @@
1
+ import React from "react";
2
+ export declare const InfoRow: React.FC<{
3
+ label: React.ReactNode;
4
+ content: boolean | {} | string | number | JSX.Element;
5
+ className?: string;
6
+ onClick?: () => void;
7
+ }>;
@@ -0,0 +1,3 @@
1
+ import React from "react";
2
+ import { InfoListProps } from "./InfoRowList.type";
3
+ export declare const InfoRowList: React.ForwardRefExoticComponent<InfoListProps & React.RefAttributes<HTMLDivElement>>;
@@ -0,0 +1,63 @@
1
+ /// <reference types="react" />
2
+ /**
3
+ * InfoRowList 组件的属性定义
4
+ */
5
+ export type InfoListProps = {
6
+ /**
7
+ * 容器的自定义类名
8
+ */
9
+ className?: string;
10
+ /**
11
+ * 每一行的自定义类名
12
+ */
13
+ rowClassName?: string;
14
+ /**
15
+ * 是否处于加载状态
16
+ * @default false
17
+ */
18
+ loading: boolean;
19
+ /**
20
+ * 信息列表数据
21
+ * @example
22
+ * ```tsx
23
+ * const data = [
24
+ * {
25
+ * key: 'name',
26
+ * name: '名称',
27
+ * value: '示例名称',
28
+ * action: <Button>编辑</Button>,
29
+ * hidden: false
30
+ * }
31
+ * ]
32
+ * ```
33
+ */
34
+ data: {
35
+ /**
36
+ * 行的唯一标识
37
+ */
38
+ key: string;
39
+ /**
40
+ * 行标签名称
41
+ */
42
+ name: React.ReactNode;
43
+ /**
44
+ * 行内容值
45
+ */
46
+ value: React.ReactNode;
47
+ /**
48
+ * 可选的操作按钮
49
+ */
50
+ action?: React.ReactNode;
51
+ /**
52
+ * 是否隐藏该行
53
+ * @default false
54
+ */
55
+ hidden?: boolean;
56
+ }[];
57
+ /**
58
+ * 是否使用紧凑模式
59
+ * 紧凑模式一般用于详情页面,普通模式用于设置页面
60
+ * @default false
61
+ */
62
+ compact?: boolean;
63
+ };
@@ -0,0 +1 @@
1
+ export * from "./InfoRowList";
@@ -1,6 +1,7 @@
1
1
  export * from "./BarChart";
2
2
  export * from "./BatchOperation";
3
3
  export * from "./ChartWithTooltip";
4
+ export * from "./CircleLoading";
4
5
  export * from "./common";
5
6
  export * from "./Counting";
6
7
  export * from "./CronCalendar";
@@ -10,8 +11,10 @@ export * from "./DeprecatedDonutChart";
10
11
  export * from "./DropdownTransition";
11
12
  export * from "./GoBackButton";
12
13
  export * from "./I18nNameTag";
14
+ export * from "./InfoRowList";
13
15
  export * from "./NamesTooltip";
14
16
  export * from "./OverflowTooltip";
17
+ export * from "./Show";
15
18
  export * from "./SidebarSubtitle";
16
19
  export * from "./Sider";
17
20
  export * from "./SortableList";
@@ -19,11 +22,11 @@ export * from "./SummaryTable";
19
22
  export * from "./SwitchWithText";
20
23
  export * from "./TabMenu";
21
24
  export * from "./UnitWithChart";
22
- export * from "./CircleLoading";
23
- export * from "./Show";
25
+ export * from "./CheckPointList";
24
26
  export { default as BarChart } from "./BarChart";
25
27
  export { default as BatchOperation } from "./BatchOperation";
26
28
  export { default as ChartWithTooltip } from "./ChartWithTooltip";
29
+ export { default as CircleLoading } from "./CircleLoading";
27
30
  export { default as Counting } from "./Counting";
28
31
  export { default as CronCalendar } from "./CronCalendar";
29
32
  export { default as CronPlan } from "./CronPlan";
@@ -41,4 +44,3 @@ export { default as SummaryTable } from "./SummaryTable";
41
44
  export { default as SwitchWithText } from "./SwitchWithText";
42
45
  export { default as TabMenu } from "./TabMenu";
43
46
  export { default as UnitWithChart } from "./UnitWithChart";
44
- export { default as CircleLoading } from "./CircleLoading";
@@ -0,0 +1,67 @@
1
+ import { type StoryObj } from "@storybook/react";
2
+ import { CheckPointList } from "../../../src/coreX/CheckPointList";
3
+ import React from "react";
4
+ /**
5
+ * CheckPointList 组件
6
+ * 用于展示检查点列表,支持通过切换开关筛选未通过的检查项
7
+ * 适用于各种预检查、健康检查等场景
8
+ *
9
+ * 组件特点:
10
+ * 1. 支持四种状态展示:成功、失败、加载中、警告
11
+ * 2. 可自定义标签样式
12
+ * 3. 可自定义告警样式
13
+ * 4. 支持筛选控制
14
+ * 5. 自定义空状态展示
15
+ */
16
+ declare const meta: {
17
+ component: React.FC<import("../../../src/coreX/CheckPointList").CheckPointListProps>;
18
+ title: string;
19
+ parameters: {
20
+ design: {
21
+ type: string;
22
+ url: string;
23
+ };
24
+ };
25
+ };
26
+ export default meta;
27
+ type Story = StoryObj<typeof CheckPointList>;
28
+ /**
29
+ * 基础用法
30
+ * 展示检查点列表的基础用法,包含成功和失败的检查项
31
+ */
32
+ export declare const Basic: Story;
33
+ /**
34
+ * 自定义标签和告警样式
35
+ * 展示如何使用自定义标签和告警样式来增强视觉效果
36
+ */
37
+ export declare const CustomStyle: Story;
38
+ /**
39
+ * 所有状态类型
40
+ * 展示所有可能的状态类型:成功、失败、加载中、警告
41
+ */
42
+ export declare const AllStatusTypes: Story;
43
+ /**
44
+ * 禁用筛选控件
45
+ * 展示禁用筛选控件的情况,适用于不需要筛选功能的场景
46
+ */
47
+ export declare const DisableFilterControl: Story;
48
+ /**
49
+ * 自定义筛选开关文案
50
+ * 展示如何自定义筛选开关的文案
51
+ */
52
+ export declare const CustomSwitchText: Story;
53
+ /**
54
+ * 空状态提示
55
+ * 展示自定义空状态提示的使用方法
56
+ */
57
+ export declare const EmptyState: Story;
58
+ /**
59
+ * 自定义空状态渲染
60
+ * 展示如何使用自定义渲染函数来创建空状态
61
+ */
62
+ export declare const CustomEmptyRender: Story;
63
+ /**
64
+ * 复杂描述内容
65
+ * 展示如何在描述中使用复杂的ReactNode内容
66
+ */
67
+ export declare const ComplexDescription: Story;
@@ -0,0 +1,36 @@
1
+ import { InfoRowList } from "../../../src/coreX";
2
+ import type { StoryObj } from "@storybook/react";
3
+ import React from "react";
4
+ /**
5
+ * InfoRowList 组件用于展示一组键值对信息,支持自定义操作按钮和加载状态。
6
+ * 支持普通模式(适用于设置页面)和紧凑模式(适用于详情页面)两种展示方式。
7
+ */
8
+ declare const meta: {
9
+ component: React.ForwardRefExoticComponent<import("../../../src/coreX/InfoRowList/InfoRowList.type").InfoListProps & React.RefAttributes<HTMLDivElement>>;
10
+ title: string;
11
+ parameters: {
12
+ layout: string;
13
+ };
14
+ };
15
+ export default meta;
16
+ type Story = StoryObj<typeof InfoRowList>;
17
+ /**
18
+ * 基础用法展示了最简单的信息列表展示方式,适用于设置页面
19
+ */
20
+ export declare const Basic: Story;
21
+ /**
22
+ * 带操作按钮的用法,每行右侧可以添加自定义的操作按钮
23
+ */
24
+ export declare const WithActions: Story;
25
+ /**
26
+ * 紧凑模式的展示方式,适用于详情页面
27
+ */
28
+ export declare const Compact: Story;
29
+ /**
30
+ * 加载状态展示
31
+ */
32
+ export declare const Loading: Story;
33
+ /**
34
+ * 空值和隐藏行的展示
35
+ */
36
+ export declare const EmptyAndHidden: Story;