@cloudtower/eagle 0.34.0 → 0.34.2
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/cjs/UIKitProvider/index.js +13 -18
- package/dist/cjs/core/Banner/banner.style.js +11 -0
- package/dist/cjs/core/Banner/index.js +32 -0
- package/dist/cjs/core/BasicCTError/BasicCTError.style.js +5 -0
- package/dist/cjs/core/BasicCTError/index.js +40 -0
- package/dist/cjs/core/ConfigProvider/index.js +8 -2
- package/dist/cjs/core/Fields/FieldsDateTimeRange/index.js +20 -3
- package/dist/cjs/core/ImmersiveDialog/index.js +188 -0
- package/dist/cjs/core/ImmersiveDialog/styles.js +31 -0
- package/dist/cjs/core/LineChart/LineChartLegend.js +7 -5
- package/dist/cjs/core/LineChart/TooltipFormatter.js +7 -6
- package/dist/cjs/core/MediumDialog/MediumDialog.js +54 -0
- package/dist/cjs/core/SmallDialog/SmallDialog.js +144 -0
- package/dist/cjs/core/SmallDialog/SmallDialog.style.js +11 -0
- package/dist/cjs/core/TableForm/AddRowButton.js +2 -2
- package/dist/cjs/core/TableForm/index.js +21 -6
- package/dist/cjs/core/Timeline/index.js +13 -7
- package/dist/cjs/core/WizardDialog/index.js +170 -0
- package/dist/cjs/core/WizardDialog/styles.js +11 -0
- package/dist/cjs/core/index.js +9 -9
- package/dist/cjs/core/message/index.js +5 -215
- package/dist/cjs/core/message/message.js +222 -0
- package/dist/cjs/core/message/useMessage.js +12 -0
- package/dist/cjs/core/message-group/index.js +2 -2
- package/dist/cjs/coreX/DateRangePicker/AbsoluteDate.js +2 -1
- package/dist/cjs/coreX/DateRangePicker/Calendar.js +78 -58
- package/dist/cjs/coreX/DateRangePicker/index.js +13 -1
- package/dist/cjs/coreX/DateRangePicker/utils.js +5 -0
- package/dist/cjs/coreX/Dialogs/DeleteDialog/DeleteDialog.js +5 -3
- package/dist/cjs/coreX/Dialogs/RejectDialog/RejectDialog.js +1 -1
- package/dist/cjs/coreX/KubeConfigModal/KubeConfigModal.style.js +29 -0
- package/dist/cjs/coreX/KubeConfigModal/index.js +102 -0
- package/dist/cjs/coreX/KubeConfigModal/utils.js +25 -0
- package/dist/cjs/hooks/useCTErrorMsg.js +25 -0
- package/dist/cjs/index.js +225 -197
- package/dist/cjs/legacy-antd.js +81 -81
- package/dist/cjs/stats1.html +1 -1
- package/dist/cjs/utils/cterror.js +64 -0
- package/dist/cjs/utils/unit.js +19 -0
- package/dist/components.css +3147 -3859
- package/dist/esm/UIKitProvider/index.js +3 -6
- package/dist/esm/core/Banner/banner.style.js +6 -0
- package/dist/esm/core/Banner/index.js +25 -0
- package/dist/esm/core/BasicCTError/BasicCTError.style.js +3 -0
- package/dist/esm/core/BasicCTError/index.js +34 -0
- package/dist/esm/core/ConfigProvider/index.js +9 -4
- package/dist/esm/core/Fields/FieldsDateTimeRange/index.js +20 -3
- package/dist/esm/core/ImmersiveDialog/index.js +182 -0
- package/dist/esm/core/ImmersiveDialog/styles.js +16 -0
- package/dist/esm/core/LineChart/LineChartLegend.js +4 -2
- package/dist/esm/core/LineChart/TooltipFormatter.js +7 -6
- package/dist/esm/core/MediumDialog/MediumDialog.js +48 -0
- package/dist/esm/core/SmallDialog/SmallDialog.js +137 -0
- package/dist/esm/core/SmallDialog/SmallDialog.style.js +6 -0
- package/dist/esm/core/TableForm/AddRowButton.js +2 -2
- package/dist/esm/core/TableForm/index.js +21 -6
- package/dist/esm/core/Timeline/index.js +13 -7
- package/dist/esm/core/WizardDialog/index.js +164 -0
- package/dist/esm/core/WizardDialog/styles.js +6 -0
- package/dist/esm/core/message/index.js +4 -184
- package/dist/esm/core/message/message.js +186 -0
- package/dist/esm/core/message/useMessage.js +9 -0
- package/dist/esm/core/message-group/index.js +1 -1
- package/dist/esm/coreX/DateRangePicker/AbsoluteDate.js +2 -1
- package/dist/esm/coreX/DateRangePicker/Calendar.js +79 -59
- package/dist/esm/coreX/DateRangePicker/index.js +13 -1
- package/dist/esm/coreX/DateRangePicker/utils.js +3 -0
- package/dist/esm/coreX/Dialogs/DeleteDialog/DeleteDialog.js +5 -3
- package/dist/esm/coreX/Dialogs/RejectDialog/RejectDialog.js +1 -1
- package/dist/esm/coreX/KubeConfigModal/KubeConfigModal.style.js +20 -0
- package/dist/esm/coreX/KubeConfigModal/index.js +96 -0
- package/dist/esm/coreX/KubeConfigModal/utils.js +22 -0
- package/dist/esm/hooks/useCTErrorMsg.js +23 -0
- package/dist/esm/index.js +14 -5
- package/dist/esm/legacy-antd.js +1 -1
- package/dist/esm/stats1.html +1 -1
- package/dist/esm/utils/cterror.js +58 -0
- package/dist/esm/utils/unit.js +17 -0
- package/dist/linaria.merged.scss +3157 -2720
- package/dist/src/UIKitProvider/index.d.ts +1 -3
- package/dist/src/core/Antd5Flex/index.d.ts +2 -0
- package/dist/src/core/Antd5Tree/Antd5Tree.d.ts +1 -0
- package/dist/src/core/Antd5Tree/Antd5Tree.type.d.ts +4 -0
- package/dist/src/core/Antd5Tree/index.d.ts +2 -0
- package/dist/src/core/Banner/banner.style.d.ts +4 -0
- package/dist/src/core/Banner/banner.types.d.ts +28 -0
- package/dist/src/core/Banner/index.d.ts +3 -0
- package/dist/src/core/BasicCTError/BasicCTError.style.d.ts +1 -0
- package/dist/src/core/BasicCTError/BasicCTError.type.d.ts +56 -0
- package/dist/src/core/BasicCTError/index.d.ts +3 -0
- package/dist/src/core/ConfigProvider/index.d.ts +6 -1
- package/dist/src/core/ImmersiveDialog/index.d.ts +3 -0
- package/dist/src/core/ImmersiveDialog/styles.d.ts +14 -0
- package/dist/src/core/ImmersiveDialog/type.d.ts +37 -0
- package/dist/src/core/Input/index.d.ts +2 -4
- package/dist/src/core/Input/input.type.d.ts +4 -0
- package/dist/src/core/LineChart/type.d.ts +1 -0
- package/dist/src/core/MediumDialog/MediumDialog.d.ts +3 -0
- package/dist/src/core/MediumDialog/index.d.ts +1 -0
- package/dist/src/core/SmallDialog/SmallDialog.d.ts +3 -0
- package/dist/src/core/SmallDialog/SmallDialog.style.d.ts +4 -0
- package/dist/src/{coreX/Dialogs/SmallDialog.d.ts → core/SmallDialog/SmallDialog.type.d.ts} +12 -4
- package/dist/src/core/SmallDialog/index.d.ts +3 -0
- package/dist/src/core/TableForm/types.d.ts +7 -2
- package/dist/src/core/Timeline/Timeline.type.d.ts +27 -7
- package/dist/src/core/Timeline/index.d.ts +5 -1
- package/dist/src/core/WizardDialog/index.d.ts +3 -0
- package/dist/src/core/WizardDialog/styles.d.ts +4 -0
- package/dist/src/core/WizardDialog/type.d.ts +31 -0
- package/dist/src/core/index.d.ts +10 -14
- package/dist/src/core/message/index.d.ts +4 -53
- package/dist/src/core/message/message.d.ts +53 -0
- package/dist/src/core/message/useMessage.d.ts +4 -0
- package/dist/src/coreX/DateRangePicker/__tests__/utils.test.d.ts +1 -0
- package/dist/src/coreX/DateRangePicker/dateRangePicker.type.d.ts +10 -2
- package/dist/src/coreX/DateRangePicker/utils.d.ts +7 -0
- package/dist/src/coreX/Dialogs/DeleteDialog/DeleteDialog.type.d.ts +2 -0
- package/dist/src/coreX/Dialogs/index.d.ts +0 -1
- package/dist/src/coreX/KubeConfigModal/KubeConfigModal.style.d.ts +9 -0
- package/dist/src/coreX/KubeConfigModal/KubeConfigModal.type.d.ts +21 -0
- package/dist/src/coreX/KubeConfigModal/index.d.ts +4 -0
- package/dist/src/coreX/KubeConfigModal/utils.d.ts +2 -0
- package/dist/src/coreX/index.d.ts +2 -0
- package/dist/src/hooks/__tests__/useCTErrorMsg.test.d.ts +1 -0
- package/dist/src/hooks/index.d.ts +1 -0
- package/dist/src/hooks/useCTErrorMsg.d.ts +7 -0
- package/dist/src/utils/__test__/cterror.test.d.ts +1 -0
- package/dist/src/utils/__test__/unit.spec.d.ts +1 -0
- package/dist/src/utils/cterror.d.ts +29 -0
- package/dist/src/utils/index.d.ts +1 -0
- package/dist/src/utils/type.d.ts +32 -0
- package/dist/src/utils/unit.d.ts +14 -0
- package/dist/stories/docs/core/Antd5Tree.stories.d.ts +44 -0
- package/dist/stories/docs/core/Banner.stories.d.ts +53 -0
- package/dist/stories/docs/core/BasicCTError.stories.d.ts +47 -0
- package/dist/stories/docs/core/FieldsDateTimeRange.stories.d.ts +1 -0
- package/dist/stories/docs/core/ImmersiveDialog.stories.d.ts +96 -0
- package/dist/stories/docs/core/Input.simple.stories.d.ts +1 -3
- package/dist/stories/docs/core/LineChart.stories.d.ts +1 -0
- package/dist/stories/docs/core/MediumDialog.stories.d.ts +35 -0
- package/dist/stories/docs/core/Modal.stories.d.ts +0 -2
- package/dist/stories/docs/core/SmallDialog.stories.d.ts +37 -0
- package/dist/stories/docs/core/Timeline.stories.d.ts +4 -1
- package/dist/stories/docs/core/WizardDialog.stories.d.ts +109 -0
- package/dist/stories/docs/coreX/DateRangePicker.stories.d.ts +1 -0
- package/dist/stories/docs/coreX/Dialogs/DeleteDialog.stories.d.ts +5 -0
- package/dist/stories/docs/coreX/KubeConfigModal.stories.d.ts +83 -0
- package/dist/style.css +2867 -2469
- package/package.json +8 -7
- package/dist/cjs/coreX/Dialogs/SmallDialog.js +0 -86
- package/dist/esm/coreX/Dialogs/SmallDialog.js +0 -80
|
@@ -9,7 +9,7 @@ import React from "react";
|
|
|
9
9
|
* * 支持使用 Area 组件灵活自定义辅助信息展示
|
|
10
10
|
*/
|
|
11
11
|
declare const meta: {
|
|
12
|
-
component: ({ items, emptyText, emptyRender, compact, emptyTextClassName, }: import("../../../src/core/Timeline").TimelineProps) => React.ReactElement<any, string | React.JSXElementConstructor<any>>;
|
|
12
|
+
component: ({ items, emptyText, emptyRender, compact, timelineContainerClassName, emptyTextClassName, }: import("../../../src/core/Timeline").TimelineProps) => React.ReactElement<any, string | React.JSXElementConstructor<any>>;
|
|
13
13
|
title: string;
|
|
14
14
|
parameters: {
|
|
15
15
|
docs: {
|
|
@@ -36,3 +36,6 @@ export declare const CustomErrorMessage: Story;
|
|
|
36
36
|
export declare const CustomTags: Story;
|
|
37
37
|
export declare const CustomInfoRender: Story;
|
|
38
38
|
export declare const CustomSubInfoRender: Story;
|
|
39
|
+
export declare const DetailMessages: Story;
|
|
40
|
+
export declare const CustomDetailMessages: Story;
|
|
41
|
+
export declare const CompatibilityTest: Story;
|
|
@@ -0,0 +1,109 @@
|
|
|
1
|
+
import { WizardDialog } from "../../../src/core/WizardDialog";
|
|
2
|
+
import React from "react";
|
|
3
|
+
export declare const StepWizardDialog: () => React.JSX.Element;
|
|
4
|
+
export declare const OnlyLeftWizardDialog: () => React.JSX.Element;
|
|
5
|
+
export declare const CustomStepsWizardDialog: () => React.JSX.Element;
|
|
6
|
+
export declare const ScrollableWizardDialog: () => React.JSX.Element;
|
|
7
|
+
declare const story: {
|
|
8
|
+
title: "Core/WizardDialog | 向导弹窗";
|
|
9
|
+
component: typeof WizardDialog;
|
|
10
|
+
decorators: ((Story: import("@storybook/types").PartialStoryFn<import("@storybook/react/dist/types-0fc72a6d").R, {
|
|
11
|
+
visible?: boolean | undefined;
|
|
12
|
+
confirmLoading?: boolean | undefined;
|
|
13
|
+
title?: React.ReactNode;
|
|
14
|
+
closable?: boolean | undefined;
|
|
15
|
+
onOk?: (((e: React.MouseEvent<HTMLElement, MouseEvent>) => void) & ((e: React.MouseEvent<HTMLElement, MouseEvent>) => void)) | undefined;
|
|
16
|
+
onCancel?: ((e: React.MouseEvent<HTMLElement, MouseEvent>) => void) | undefined;
|
|
17
|
+
afterClose?: (() => void) | undefined;
|
|
18
|
+
centered?: boolean | undefined;
|
|
19
|
+
width?: string | number | undefined;
|
|
20
|
+
footer?: React.ReactNode;
|
|
21
|
+
okText?: ((boolean | React.ReactChild | React.ReactFragment | React.ReactPortal | null) & string) | undefined;
|
|
22
|
+
okType?: import("antd/lib/button/button").LegacyButtonType | undefined;
|
|
23
|
+
cancelText?: ((boolean | React.ReactChild | React.ReactFragment | React.ReactPortal | null) & string) | undefined;
|
|
24
|
+
maskClosable?: boolean | undefined;
|
|
25
|
+
forceRender?: boolean | undefined;
|
|
26
|
+
okButtonProps?: (Partial<{
|
|
27
|
+
href: string;
|
|
28
|
+
target?: string | undefined;
|
|
29
|
+
onClick?: React.MouseEventHandler<HTMLElement> | undefined;
|
|
30
|
+
} & import("antd/lib/button/button").BaseButtonProps & import("antd/lib/_util/type").Omit<React.AnchorHTMLAttributes<any>, "onClick" | "type"> & {
|
|
31
|
+
htmlType?: "button" | "reset" | "submit" | undefined;
|
|
32
|
+
onClick?: React.MouseEventHandler<HTMLElement> | undefined;
|
|
33
|
+
} & import("antd/lib/_util/type").Omit<React.ButtonHTMLAttributes<any>, "onClick" | "type">> & {
|
|
34
|
+
prefixIcon?: JSX.Element | undefined;
|
|
35
|
+
hoverPrefixIcon?: JSX.Element | undefined;
|
|
36
|
+
suffixIcon?: JSX.Element | undefined;
|
|
37
|
+
hoverSuffixIcon?: JSX.Element | undefined;
|
|
38
|
+
type?: "link" | "text" | "dashed" | "default" | "primary" | "ghost" | "secondary" | "tertiary" | "ordinary" | "ordinary-onTint" | "quiet" | undefined;
|
|
39
|
+
} & Omit<Partial<{
|
|
40
|
+
href: string;
|
|
41
|
+
target?: string | undefined;
|
|
42
|
+
onClick?: React.MouseEventHandler<HTMLElement> | undefined;
|
|
43
|
+
} & import("antd/lib/button/button").BaseButtonProps & import("antd/lib/_util/type").Omit<React.AnchorHTMLAttributes<any>, "onClick" | "type"> & {
|
|
44
|
+
htmlType?: "button" | "reset" | "submit" | undefined;
|
|
45
|
+
onClick?: React.MouseEventHandler<HTMLElement> | undefined;
|
|
46
|
+
} & import("antd/lib/_util/type").Omit<React.ButtonHTMLAttributes<any>, "onClick" | "type">>, "icon" | "type">) | undefined;
|
|
47
|
+
cancelButtonProps?: (Partial<{
|
|
48
|
+
href: string;
|
|
49
|
+
target?: string | undefined;
|
|
50
|
+
onClick?: React.MouseEventHandler<HTMLElement> | undefined;
|
|
51
|
+
} & import("antd/lib/button/button").BaseButtonProps & import("antd/lib/_util/type").Omit<React.AnchorHTMLAttributes<any>, "onClick" | "type"> & {
|
|
52
|
+
htmlType?: "button" | "reset" | "submit" | undefined;
|
|
53
|
+
onClick?: React.MouseEventHandler<HTMLElement> | undefined;
|
|
54
|
+
} & import("antd/lib/_util/type").Omit<React.ButtonHTMLAttributes<any>, "onClick" | "type">> & {
|
|
55
|
+
prefixIcon?: JSX.Element | undefined;
|
|
56
|
+
hoverPrefixIcon?: JSX.Element | undefined;
|
|
57
|
+
suffixIcon?: JSX.Element | undefined;
|
|
58
|
+
hoverSuffixIcon?: JSX.Element | undefined;
|
|
59
|
+
type?: "link" | "text" | "dashed" | "default" | "primary" | "ghost" | "secondary" | "tertiary" | "ordinary" | "ordinary-onTint" | "quiet" | undefined;
|
|
60
|
+
} & Omit<Partial<{
|
|
61
|
+
href: string;
|
|
62
|
+
target?: string | undefined;
|
|
63
|
+
onClick?: React.MouseEventHandler<HTMLElement> | undefined;
|
|
64
|
+
} & import("antd/lib/button/button").BaseButtonProps & import("antd/lib/_util/type").Omit<React.AnchorHTMLAttributes<any>, "onClick" | "type"> & {
|
|
65
|
+
htmlType?: "button" | "reset" | "submit" | undefined;
|
|
66
|
+
onClick?: React.MouseEventHandler<HTMLElement> | undefined;
|
|
67
|
+
} & import("antd/lib/_util/type").Omit<React.ButtonHTMLAttributes<any>, "onClick" | "type">>, "icon" | "type">) | undefined;
|
|
68
|
+
destroyOnClose?: boolean | undefined;
|
|
69
|
+
style?: React.CSSProperties | undefined;
|
|
70
|
+
wrapClassName?: string | undefined;
|
|
71
|
+
maskTransitionName?: string | undefined;
|
|
72
|
+
transitionName?: string | undefined;
|
|
73
|
+
className?: string | undefined;
|
|
74
|
+
getContainer?: string | false | HTMLElement | (() => HTMLElement) | null | undefined;
|
|
75
|
+
zIndex?: number | undefined;
|
|
76
|
+
bodyStyle?: React.CSSProperties | undefined;
|
|
77
|
+
maskStyle?: React.CSSProperties | undefined;
|
|
78
|
+
mask?: boolean | undefined;
|
|
79
|
+
keyboard?: boolean | undefined;
|
|
80
|
+
wrapProps?: any;
|
|
81
|
+
prefixCls?: string | undefined;
|
|
82
|
+
closeIcon?: React.ReactNode;
|
|
83
|
+
focusTriggerAfterClose?: boolean | undefined;
|
|
84
|
+
showCancel?: boolean | undefined;
|
|
85
|
+
showOk?: boolean | undefined;
|
|
86
|
+
okLoading?: boolean | undefined;
|
|
87
|
+
error?: React.ReactNode;
|
|
88
|
+
isContentFull?: boolean | undefined;
|
|
89
|
+
left?: React.ReactNode;
|
|
90
|
+
leftClassName?: string | undefined;
|
|
91
|
+
right?: React.ReactNode;
|
|
92
|
+
rightClassName?: string | undefined;
|
|
93
|
+
footerLeftAction?: React.ReactNode;
|
|
94
|
+
children?: React.ReactNode;
|
|
95
|
+
step?: number | undefined;
|
|
96
|
+
steps?: {
|
|
97
|
+
title: string;
|
|
98
|
+
children: React.ReactNode;
|
|
99
|
+
}[] | undefined;
|
|
100
|
+
hideSteps?: boolean | undefined;
|
|
101
|
+
destroyOtherStep?: boolean | undefined;
|
|
102
|
+
prevText?: string | undefined;
|
|
103
|
+
onPrevStep?: ((step: number) => void) | undefined;
|
|
104
|
+
nextText?: string | undefined;
|
|
105
|
+
onNextStep?: ((step: number) => boolean | void) | undefined;
|
|
106
|
+
onStepChange?: ((step: number) => void) | undefined;
|
|
107
|
+
}>) => React.JSX.Element)[];
|
|
108
|
+
};
|
|
109
|
+
export default story;
|
|
@@ -16,6 +16,7 @@ declare const meta: {
|
|
|
16
16
|
onOk?: ((popModal: () => void) => void) | undefined;
|
|
17
17
|
onCancel?: ((popModal: () => void) => void) | undefined;
|
|
18
18
|
className?: string | undefined;
|
|
19
|
+
confirmLoading?: boolean | undefined;
|
|
19
20
|
children?: React.ReactNode;
|
|
20
21
|
}>) => React.JSX.Element)[];
|
|
21
22
|
args: {};
|
|
@@ -35,3 +36,7 @@ export declare const Basic: () => React.JSX.Element;
|
|
|
35
36
|
* 自定义按钮文案
|
|
36
37
|
*/
|
|
37
38
|
export declare const CustomButtonText: () => React.JSX.Element;
|
|
39
|
+
/**
|
|
40
|
+
* 确认按钮加载状态
|
|
41
|
+
*/
|
|
42
|
+
export declare const ConfirmLoading: () => React.JSX.Element;
|
|
@@ -0,0 +1,83 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
import KubeConfigModal from "../../../src/coreX/KubeConfigModal";
|
|
3
|
+
import type { StoryObj } from "@storybook/react";
|
|
4
|
+
/**
|
|
5
|
+
* KubeConfigModal 组件
|
|
6
|
+
*
|
|
7
|
+
* 用于显示和下载 Kubernetes 集群配置文件的全屏模态框组件。
|
|
8
|
+
* 支持复制配置内容到剪贴板、下载配置文件等功能。
|
|
9
|
+
*
|
|
10
|
+
* ### 参数说明
|
|
11
|
+
*
|
|
12
|
+
* | 参数 | 说明 | 类型 | 默认值 |
|
|
13
|
+
* | --- | --- | --- | --- |
|
|
14
|
+
* | downloadName | 下载文件的名称,不包含文件扩展名,会自动添加 .yaml 后缀 | string | - |
|
|
15
|
+
* | customDesc | 自定义描述文本,如果不提供则使用默认的下载提示文案 | string | - |
|
|
16
|
+
* | loading | 是否显示加载状态,当为 true 时会显示 Loading 组件 | boolean | false |
|
|
17
|
+
* | data | kubeconfig 配置数据内容,通常是 YAML 格式的字符串 | string | - |
|
|
18
|
+
* | error | 错误信息,当有错误时会禁用下载按钮 | string | - |
|
|
19
|
+
* | refetch | 重新获取数据的回调函数,用于刷新 kubeconfig 内容 | () => void | - |
|
|
20
|
+
*/
|
|
21
|
+
declare const meta: {
|
|
22
|
+
component: React.FC<import("../../../src/coreX/KubeConfigModal/KubeConfigModal.type").KubeConfigModalProps>;
|
|
23
|
+
title: "CoreX/KubeConfigModal | Kubeconfig 下载模态框";
|
|
24
|
+
decorators: ((Story: import("@storybook/types").PartialStoryFn<import("@storybook/react/dist/types-0fc72a6d").R, {
|
|
25
|
+
downloadName: string;
|
|
26
|
+
customDesc?: string | undefined;
|
|
27
|
+
loading?: boolean | undefined;
|
|
28
|
+
data: string;
|
|
29
|
+
error?: string | undefined;
|
|
30
|
+
refetch?: (() => void) | undefined;
|
|
31
|
+
children?: React.ReactNode;
|
|
32
|
+
}>) => React.JSX.Element)[];
|
|
33
|
+
parameters: {
|
|
34
|
+
design: {
|
|
35
|
+
type: string;
|
|
36
|
+
url: string;
|
|
37
|
+
};
|
|
38
|
+
};
|
|
39
|
+
};
|
|
40
|
+
export default meta;
|
|
41
|
+
type Story = StoryObj<typeof KubeConfigModal>;
|
|
42
|
+
/**
|
|
43
|
+
* 基础用法
|
|
44
|
+
*
|
|
45
|
+
* 展示 KubeConfigModal 组件的基本功能,包括显示 kubeconfig 内容、
|
|
46
|
+
* 复制到剪贴板和下载配置文件。
|
|
47
|
+
*/
|
|
48
|
+
export declare const Basic: Story;
|
|
49
|
+
/**
|
|
50
|
+
* 自定义描述文本
|
|
51
|
+
*
|
|
52
|
+
* 通过 customDesc 参数自定义模态框中的描述文本,
|
|
53
|
+
* 适用于需要特殊说明的场景。
|
|
54
|
+
*/
|
|
55
|
+
export declare const CustomDescription: Story;
|
|
56
|
+
/**
|
|
57
|
+
* 加载状态
|
|
58
|
+
*
|
|
59
|
+
* 当 loading 为 true 时,模态框会显示加载状态,
|
|
60
|
+
* 同时禁用下载按钮,适用于异步获取配置数据的场景。
|
|
61
|
+
*/
|
|
62
|
+
export declare const Loading: Story;
|
|
63
|
+
/**
|
|
64
|
+
* 长内容展示
|
|
65
|
+
*
|
|
66
|
+
* 展示包含多个集群和上下文的复杂 kubeconfig 内容,
|
|
67
|
+
* 验证组件在长内容情况下的显示效果。
|
|
68
|
+
*/
|
|
69
|
+
export declare const LongContent: Story;
|
|
70
|
+
/**
|
|
71
|
+
* 错误状态
|
|
72
|
+
*
|
|
73
|
+
* 当有错误信息时,下载按钮会被禁用,
|
|
74
|
+
* 适用于配置获取失败或无效的场景。
|
|
75
|
+
*/
|
|
76
|
+
export declare const Error: Story;
|
|
77
|
+
/**
|
|
78
|
+
* 带刷新功能
|
|
79
|
+
*
|
|
80
|
+
* 通过 refetch 回调函数提供重新获取数据的功能,
|
|
81
|
+
* 适用于需要动态更新配置的场景。
|
|
82
|
+
*/
|
|
83
|
+
export declare const WithRefetch: Story;
|