@alauda/console-ui 0.1.0-next.20260731.1785490048
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 +41 -0
- package/index.d.ts +151 -0
- package/index.js +315 -0
- package/index.js.map +1 -0
- package/package.json +33 -0
package/README.md
ADDED
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
# `@alauda/console-ui`
|
|
2
|
+
|
|
3
|
+
`@alauda/console-ui` 是面向 ACP Console 核心页面和能力插件的语义化 React UI facade。
|
|
4
|
+
|
|
5
|
+
首个预发布版本包含低耦合的内容区、反馈状态、资源展示和字段展示基础组件。它不拥有
|
|
6
|
+
Host Shell、Kubernetes 数据 client、cache、watch manager、权限运行时或 Module Federation
|
|
7
|
+
Provider。
|
|
8
|
+
|
|
9
|
+
`PageLayout` 不属于本 package。页面根节点、主内容区域、响应式页面标题和 Shell 级导航由
|
|
10
|
+
Console Host 负责。`PageSection` 和 `PageToolbar` 是可以在 Core 页面和能力页面中共同使用的
|
|
11
|
+
内容区语义 primitive,因此保留在本 package 中。
|
|
12
|
+
|
|
13
|
+
`ResourceRef` 是资源身份语义类型。`ResourceLink` 渲染调用方明确提供的 route,
|
|
14
|
+
`ResourceStatus` 渲染领域 package 提供的标准化状态。Kubernetes、GitOps、Observability
|
|
15
|
+
和 Cluster Manage 的领域状态机仍然留在各自领域包之外。
|
|
16
|
+
|
|
17
|
+
源码 workspace 保持私有。仓库的 `yarn build:npm` 命令会在 `dist/package` 下生成可发布产物。
|
|
18
|
+
|
|
19
|
+
## 目录与组件分类
|
|
20
|
+
|
|
21
|
+
package 目录按语义能力和运行时边界组织。当前 MR 只实现低风险的四类基础能力;其他目录是后续 contract 和任务的占位,不代表组件已经完成。
|
|
22
|
+
|
|
23
|
+
```text
|
|
24
|
+
src/
|
|
25
|
+
├── index.ts # 唯一 public entry
|
|
26
|
+
├── types.ts # 公共语义类型
|
|
27
|
+
├── layout/ # 页面内容区
|
|
28
|
+
├── feedback/ # 异步反馈
|
|
29
|
+
├── resource/ # 资源语义
|
|
30
|
+
├── field/ # 字段展示
|
|
31
|
+
├── table/ # 后续:DataTable
|
|
32
|
+
├── form/ # 后续:FormArrayTable 等
|
|
33
|
+
├── selector/ # 后续:scope selector
|
|
34
|
+
├── access/ # 后续:ActionGuard
|
|
35
|
+
├── adapters/ # 后续:SDK/Host runtime adapter
|
|
36
|
+
└── internal/ # MUI/Emotion 实现细节
|
|
37
|
+
```
|
|
38
|
+
|
|
39
|
+
详细的组件分类、当前状态、目录边界和后续任务见 [`component-catalog.md`](../../docs/changes/define-ui-layer-and-library-switch/component-catalog.md)。
|
|
40
|
+
|
|
41
|
+
`PageLayout`、Host Shell、CRD Schema Form、Monaco/YAML、Topology、Chart、Dashboard、Alarm、Log 和 Terminal 不属于这个 package;它们分别由 Host、Core UI carrier、capability plugin 或独立 domain package 承载。
|
package/index.d.ts
ADDED
|
@@ -0,0 +1,151 @@
|
|
|
1
|
+
import { JSX } from 'react';
|
|
2
|
+
import type { ReactElement } from 'react';
|
|
3
|
+
import type { ReactNode } from 'react';
|
|
4
|
+
|
|
5
|
+
export declare function AsyncBoundary({ state, children, loading, empty, error, forbidden, unavailable, onRetry, className, testId, }: AsyncBoundaryProps): JSX.Element;
|
|
6
|
+
|
|
7
|
+
export declare interface AsyncBoundaryProps extends ContentProps {
|
|
8
|
+
state: AsyncBoundaryState;
|
|
9
|
+
loading?: ReactNode;
|
|
10
|
+
empty?: ReactNode;
|
|
11
|
+
error?: ReactNode;
|
|
12
|
+
forbidden?: ReactNode;
|
|
13
|
+
unavailable?: ReactNode;
|
|
14
|
+
onRetry?: () => void;
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
export declare type AsyncBoundaryState = 'loading' | 'empty' | 'error' | 'forbidden' | 'unavailable' | 'ready';
|
|
18
|
+
|
|
19
|
+
export declare interface BreadcrumbItem {
|
|
20
|
+
label: string;
|
|
21
|
+
href?: string;
|
|
22
|
+
current?: boolean;
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
export declare function Breadcrumbs({ items, ariaLabel, className, testId, }: BreadcrumbsProps): JSX.Element;
|
|
26
|
+
|
|
27
|
+
export declare interface BreadcrumbsProps extends ContentProps {
|
|
28
|
+
items: readonly BreadcrumbItem[];
|
|
29
|
+
ariaLabel?: string;
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
export declare interface ContentProps {
|
|
33
|
+
children?: ReactNode;
|
|
34
|
+
className?: string;
|
|
35
|
+
testId?: string;
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
export declare function EmptyState({ title, description, action, className, testId, }: EmptyStateProps): JSX.Element;
|
|
39
|
+
|
|
40
|
+
export declare interface EmptyStateProps extends ContentProps {
|
|
41
|
+
title?: ReactNode;
|
|
42
|
+
description?: ReactNode;
|
|
43
|
+
action?: ReactNode;
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
export declare function ErrorState({ title, message, onRetry, retryLabel, className, testId, }: ErrorStateProps): JSX.Element;
|
|
47
|
+
|
|
48
|
+
export declare interface ErrorStateProps extends ContentProps {
|
|
49
|
+
title?: ReactNode;
|
|
50
|
+
message?: ReactNode;
|
|
51
|
+
onRetry?: () => void;
|
|
52
|
+
retryLabel?: string;
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
export declare function FieldValue({ label, value, copyable, copyValue, onCopy, emptyLabel, className, testId, }: FieldValueProps): JSX.Element;
|
|
56
|
+
|
|
57
|
+
export declare interface FieldValueProps extends ContentProps {
|
|
58
|
+
label?: ReactNode;
|
|
59
|
+
value?: ReactNode;
|
|
60
|
+
copyable?: boolean;
|
|
61
|
+
copyValue?: string;
|
|
62
|
+
onCopy?: (value: string) => void;
|
|
63
|
+
emptyLabel?: ReactNode;
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
export declare function LoadingState({ label, className, testId, }: LoadingStateProps): JSX.Element;
|
|
67
|
+
|
|
68
|
+
export declare interface LoadingStateProps extends ContentProps {
|
|
69
|
+
label?: string;
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
export declare function PageSection({ title, description, actions, children, className, testId, }: PageSectionProps): JSX.Element;
|
|
73
|
+
|
|
74
|
+
export declare interface PageSectionProps extends ContentProps {
|
|
75
|
+
title?: ReactNode;
|
|
76
|
+
description?: ReactNode;
|
|
77
|
+
actions?: ReactNode;
|
|
78
|
+
}
|
|
79
|
+
|
|
80
|
+
export declare function PageToolbar({ ariaLabel, children, className, testId, }: PageToolbarProps): JSX.Element;
|
|
81
|
+
|
|
82
|
+
export declare interface PageToolbarProps extends ContentProps {
|
|
83
|
+
ariaLabel?: string;
|
|
84
|
+
}
|
|
85
|
+
|
|
86
|
+
export declare function ResourceIcon({ kind, label, icon, decorative, className, testId, }: ResourceIconProps): JSX.Element;
|
|
87
|
+
|
|
88
|
+
export declare interface ResourceIconProps extends ContentProps {
|
|
89
|
+
kind?: string;
|
|
90
|
+
label?: string;
|
|
91
|
+
icon?: ReactNode;
|
|
92
|
+
decorative?: boolean;
|
|
93
|
+
}
|
|
94
|
+
|
|
95
|
+
export declare function ResourceLink({ resource, href, external, disabled, ariaLabel, children, className, testId, }: ResourceLinkProps): JSX.Element;
|
|
96
|
+
|
|
97
|
+
export declare interface ResourceLinkProps extends ContentProps {
|
|
98
|
+
resource: ResourceRef;
|
|
99
|
+
href?: string;
|
|
100
|
+
external?: boolean;
|
|
101
|
+
disabled?: boolean;
|
|
102
|
+
ariaLabel?: string;
|
|
103
|
+
}
|
|
104
|
+
|
|
105
|
+
/** Resource names are semantic values, not renderer-specific text props. */
|
|
106
|
+
export declare type ResourceName = string;
|
|
107
|
+
|
|
108
|
+
/** Stable semantic identity supplied to resource-oriented UI components. */
|
|
109
|
+
export declare interface ResourceRef {
|
|
110
|
+
name: string;
|
|
111
|
+
apiGroup?: string;
|
|
112
|
+
apiVersion?: string;
|
|
113
|
+
kind?: string;
|
|
114
|
+
namespace?: string;
|
|
115
|
+
cluster?: string;
|
|
116
|
+
route?: string;
|
|
117
|
+
}
|
|
118
|
+
|
|
119
|
+
export declare function ResourceStatus({ status, icon, className, testId, }: ResourceStatusProps): JSX.Element;
|
|
120
|
+
|
|
121
|
+
export declare interface ResourceStatusProps extends ContentProps {
|
|
122
|
+
status: ResourceStatusValue;
|
|
123
|
+
icon?: ReactElement;
|
|
124
|
+
}
|
|
125
|
+
|
|
126
|
+
export declare type ResourceStatusTone = 'neutral' | 'info' | 'success' | 'warning' | 'error';
|
|
127
|
+
|
|
128
|
+
/** Domain packages provide normalized status values to ResourceStatus. */
|
|
129
|
+
export declare interface ResourceStatusValue {
|
|
130
|
+
key: string;
|
|
131
|
+
label: string;
|
|
132
|
+
tone: ResourceStatusTone;
|
|
133
|
+
description?: string;
|
|
134
|
+
}
|
|
135
|
+
|
|
136
|
+
export declare function TagList({ tags, maxVisible, ariaLabel, className, testId, }: TagListProps): JSX.Element;
|
|
137
|
+
|
|
138
|
+
export declare interface TagListProps extends ContentProps {
|
|
139
|
+
tags: readonly string[];
|
|
140
|
+
maxVisible?: number;
|
|
141
|
+
ariaLabel?: string;
|
|
142
|
+
}
|
|
143
|
+
|
|
144
|
+
export declare function TruncatedText({ text, maxLines, className, testId, }: TruncatedTextProps): JSX.Element;
|
|
145
|
+
|
|
146
|
+
export declare interface TruncatedTextProps extends ContentProps {
|
|
147
|
+
text: string;
|
|
148
|
+
maxLines?: number;
|
|
149
|
+
}
|
|
150
|
+
|
|
151
|
+
export { }
|
package/index.js
ADDED
|
@@ -0,0 +1,315 @@
|
|
|
1
|
+
import Alert from "@mui/material/Alert";
|
|
2
|
+
import Box from "@mui/material/Box";
|
|
3
|
+
import Button from "@mui/material/Button";
|
|
4
|
+
import CircularProgress from "@mui/material/CircularProgress";
|
|
5
|
+
import Stack from "@mui/material/Stack";
|
|
6
|
+
import Typography from "@mui/material/Typography";
|
|
7
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
8
|
+
import Chip from "@mui/material/Chip";
|
|
9
|
+
import Tooltip from "@mui/material/Tooltip";
|
|
10
|
+
import BreadcrumbsMui from "@mui/material/Breadcrumbs";
|
|
11
|
+
import Link from "@mui/material/Link";
|
|
12
|
+
//#region packages/console-ui/src/feedback/index.tsx
|
|
13
|
+
function LoadingState({ label = "Loading", className, testId }) {
|
|
14
|
+
return /* @__PURE__ */ jsxs(Stack, {
|
|
15
|
+
role: "status",
|
|
16
|
+
"aria-label": label,
|
|
17
|
+
"aria-live": "polite",
|
|
18
|
+
className,
|
|
19
|
+
"data-testid": testId,
|
|
20
|
+
sx: {
|
|
21
|
+
minHeight: 96,
|
|
22
|
+
p: 2,
|
|
23
|
+
alignItems: "center",
|
|
24
|
+
justifyContent: "center",
|
|
25
|
+
gap: 1
|
|
26
|
+
},
|
|
27
|
+
children: [/* @__PURE__ */ jsx(CircularProgress, {
|
|
28
|
+
size: 24,
|
|
29
|
+
"aria-hidden": "true"
|
|
30
|
+
}), /* @__PURE__ */ jsx(Typography, {
|
|
31
|
+
variant: "body2",
|
|
32
|
+
color: "text.secondary",
|
|
33
|
+
children: label
|
|
34
|
+
})]
|
|
35
|
+
});
|
|
36
|
+
}
|
|
37
|
+
function EmptyState({ title = "No data", description, action, className, testId }) {
|
|
38
|
+
return /* @__PURE__ */ jsxs(Stack, {
|
|
39
|
+
role: "status",
|
|
40
|
+
className,
|
|
41
|
+
"data-testid": testId,
|
|
42
|
+
sx: {
|
|
43
|
+
p: 3,
|
|
44
|
+
textAlign: "center",
|
|
45
|
+
alignItems: "center",
|
|
46
|
+
gap: 1
|
|
47
|
+
},
|
|
48
|
+
children: [
|
|
49
|
+
/* @__PURE__ */ jsx(Typography, {
|
|
50
|
+
variant: "h6",
|
|
51
|
+
children: title
|
|
52
|
+
}),
|
|
53
|
+
description && /* @__PURE__ */ jsx(Typography, {
|
|
54
|
+
color: "text.secondary",
|
|
55
|
+
variant: "body2",
|
|
56
|
+
children: description
|
|
57
|
+
}),
|
|
58
|
+
action
|
|
59
|
+
]
|
|
60
|
+
});
|
|
61
|
+
}
|
|
62
|
+
function ErrorState({ title = "Something went wrong", message, onRetry, retryLabel = "Retry", className, testId }) {
|
|
63
|
+
return /* @__PURE__ */ jsxs(Alert, {
|
|
64
|
+
severity: "error",
|
|
65
|
+
role: "alert",
|
|
66
|
+
className,
|
|
67
|
+
"data-testid": testId,
|
|
68
|
+
action: onRetry ? /* @__PURE__ */ jsx(Button, {
|
|
69
|
+
color: "inherit",
|
|
70
|
+
size: "small",
|
|
71
|
+
onClick: onRetry,
|
|
72
|
+
children: retryLabel
|
|
73
|
+
}) : void 0,
|
|
74
|
+
children: [/* @__PURE__ */ jsx(Typography, {
|
|
75
|
+
component: "span",
|
|
76
|
+
sx: { fontWeight: 600 },
|
|
77
|
+
children: title
|
|
78
|
+
}), message && /* @__PURE__ */ jsx(Box, {
|
|
79
|
+
component: "span",
|
|
80
|
+
sx: {
|
|
81
|
+
display: "block",
|
|
82
|
+
mt: .5
|
|
83
|
+
},
|
|
84
|
+
children: message
|
|
85
|
+
})]
|
|
86
|
+
});
|
|
87
|
+
}
|
|
88
|
+
function AsyncBoundary({ state, children, loading, empty, error, forbidden, unavailable, onRetry, className, testId }) {
|
|
89
|
+
return /* @__PURE__ */ jsx(Box, {
|
|
90
|
+
className,
|
|
91
|
+
"data-testid": testId,
|
|
92
|
+
children: (() => {
|
|
93
|
+
switch (state) {
|
|
94
|
+
case "loading": return loading ?? /* @__PURE__ */ jsx(LoadingState, {});
|
|
95
|
+
case "empty": return empty ?? /* @__PURE__ */ jsx(EmptyState, {});
|
|
96
|
+
case "error": return error ?? /* @__PURE__ */ jsx(ErrorState, { onRetry });
|
|
97
|
+
case "forbidden": return forbidden ?? /* @__PURE__ */ jsx(EmptyState, {
|
|
98
|
+
title: "Access denied",
|
|
99
|
+
description: "You do not have permission to view this content."
|
|
100
|
+
});
|
|
101
|
+
case "unavailable": return unavailable ?? /* @__PURE__ */ jsx(ErrorState, {
|
|
102
|
+
title: "Unavailable",
|
|
103
|
+
message: "This content is temporarily unavailable.",
|
|
104
|
+
onRetry
|
|
105
|
+
});
|
|
106
|
+
case "ready": return children;
|
|
107
|
+
}
|
|
108
|
+
})()
|
|
109
|
+
});
|
|
110
|
+
}
|
|
111
|
+
//#endregion
|
|
112
|
+
//#region packages/console-ui/src/field/index.tsx
|
|
113
|
+
function FieldValue({ label, value, copyable = false, copyValue, onCopy, emptyLabel = "—", className, testId }) {
|
|
114
|
+
const hasValue = value !== void 0 && value !== null && value !== "";
|
|
115
|
+
const handleCopy = () => {
|
|
116
|
+
if (!copyValue) return;
|
|
117
|
+
onCopy?.(copyValue);
|
|
118
|
+
navigator.clipboard?.writeText(copyValue);
|
|
119
|
+
};
|
|
120
|
+
return /* @__PURE__ */ jsxs(Stack, {
|
|
121
|
+
className,
|
|
122
|
+
"data-testid": testId,
|
|
123
|
+
sx: { gap: .5 },
|
|
124
|
+
children: [label && /* @__PURE__ */ jsx(Typography, {
|
|
125
|
+
color: "text.secondary",
|
|
126
|
+
variant: "caption",
|
|
127
|
+
children: label
|
|
128
|
+
}), /* @__PURE__ */ jsxs(Stack, {
|
|
129
|
+
sx: {
|
|
130
|
+
flexDirection: "row",
|
|
131
|
+
alignItems: "center",
|
|
132
|
+
gap: 1,
|
|
133
|
+
minWidth: 0
|
|
134
|
+
},
|
|
135
|
+
children: [/* @__PURE__ */ jsx(Typography, {
|
|
136
|
+
component: "span",
|
|
137
|
+
variant: "body2",
|
|
138
|
+
sx: { minWidth: 0 },
|
|
139
|
+
children: hasValue ? value : emptyLabel
|
|
140
|
+
}), copyable && copyValue && /* @__PURE__ */ jsx(Button, {
|
|
141
|
+
size: "small",
|
|
142
|
+
onClick: handleCopy,
|
|
143
|
+
"aria-label": "Copy value",
|
|
144
|
+
children: "Copy"
|
|
145
|
+
})]
|
|
146
|
+
})]
|
|
147
|
+
});
|
|
148
|
+
}
|
|
149
|
+
function TruncatedText({ text, maxLines = 1, className, testId }) {
|
|
150
|
+
return /* @__PURE__ */ jsx(Tooltip, {
|
|
151
|
+
title: text,
|
|
152
|
+
children: /* @__PURE__ */ jsx(Typography, {
|
|
153
|
+
component: "span",
|
|
154
|
+
className,
|
|
155
|
+
"data-testid": testId,
|
|
156
|
+
sx: {
|
|
157
|
+
display: "-webkit-box",
|
|
158
|
+
overflow: "hidden",
|
|
159
|
+
WebkitBoxOrient: "vertical",
|
|
160
|
+
WebkitLineClamp: maxLines
|
|
161
|
+
},
|
|
162
|
+
children: text
|
|
163
|
+
})
|
|
164
|
+
});
|
|
165
|
+
}
|
|
166
|
+
function TagList({ tags, maxVisible, ariaLabel = "Tags", className, testId }) {
|
|
167
|
+
const visibleTags = maxVisible === void 0 ? tags : tags.slice(0, maxVisible);
|
|
168
|
+
const remaining = tags.length - visibleTags.length;
|
|
169
|
+
return /* @__PURE__ */ jsxs(Stack, {
|
|
170
|
+
component: "span",
|
|
171
|
+
role: "list",
|
|
172
|
+
"aria-label": ariaLabel,
|
|
173
|
+
className,
|
|
174
|
+
"data-testid": testId,
|
|
175
|
+
sx: {
|
|
176
|
+
flexDirection: "row",
|
|
177
|
+
flexWrap: "wrap",
|
|
178
|
+
gap: .5
|
|
179
|
+
},
|
|
180
|
+
children: [visibleTags.map((tag, index) => /* @__PURE__ */ jsx(Chip, {
|
|
181
|
+
component: "span",
|
|
182
|
+
role: "listitem",
|
|
183
|
+
label: tag,
|
|
184
|
+
size: "small"
|
|
185
|
+
}, `${tag}-${index}`)), remaining > 0 && /* @__PURE__ */ jsx(Chip, {
|
|
186
|
+
component: "span",
|
|
187
|
+
role: "listitem",
|
|
188
|
+
label: `+${remaining} more`,
|
|
189
|
+
size: "small",
|
|
190
|
+
"aria-label": `${remaining} more tags`
|
|
191
|
+
})]
|
|
192
|
+
});
|
|
193
|
+
}
|
|
194
|
+
//#endregion
|
|
195
|
+
//#region packages/console-ui/src/layout/index.tsx
|
|
196
|
+
function PageSection({ title, description, actions, children, className, testId }) {
|
|
197
|
+
return /* @__PURE__ */ jsxs(Box, {
|
|
198
|
+
component: "section",
|
|
199
|
+
className,
|
|
200
|
+
"data-testid": testId,
|
|
201
|
+
children: [(title || description || actions) && /* @__PURE__ */ jsxs(Stack, {
|
|
202
|
+
sx: {
|
|
203
|
+
flexDirection: "row",
|
|
204
|
+
alignItems: "flex-start",
|
|
205
|
+
justifyContent: "space-between",
|
|
206
|
+
gap: 2,
|
|
207
|
+
mb: 2
|
|
208
|
+
},
|
|
209
|
+
children: [/* @__PURE__ */ jsxs(Box, { children: [title && /* @__PURE__ */ jsx(Typography, {
|
|
210
|
+
variant: "h6",
|
|
211
|
+
children: title
|
|
212
|
+
}), description && /* @__PURE__ */ jsx(Typography, {
|
|
213
|
+
color: "text.secondary",
|
|
214
|
+
variant: "body2",
|
|
215
|
+
children: description
|
|
216
|
+
})] }), actions && /* @__PURE__ */ jsx(Box, { children: actions })]
|
|
217
|
+
}), children]
|
|
218
|
+
});
|
|
219
|
+
}
|
|
220
|
+
function PageToolbar({ ariaLabel = "Page actions", children, className, testId }) {
|
|
221
|
+
return /* @__PURE__ */ jsx(Stack, {
|
|
222
|
+
component: "div",
|
|
223
|
+
role: "toolbar",
|
|
224
|
+
"aria-label": ariaLabel,
|
|
225
|
+
className,
|
|
226
|
+
"data-testid": testId,
|
|
227
|
+
sx: {
|
|
228
|
+
flexDirection: "row",
|
|
229
|
+
alignItems: "center",
|
|
230
|
+
flexWrap: "wrap",
|
|
231
|
+
gap: 1
|
|
232
|
+
},
|
|
233
|
+
children
|
|
234
|
+
});
|
|
235
|
+
}
|
|
236
|
+
function Breadcrumbs({ items, ariaLabel = "Breadcrumbs", className, testId }) {
|
|
237
|
+
return /* @__PURE__ */ jsx(BreadcrumbsMui, {
|
|
238
|
+
"aria-label": ariaLabel,
|
|
239
|
+
className,
|
|
240
|
+
"data-testid": testId,
|
|
241
|
+
children: items.map((item) => item.href && !item.current ? /* @__PURE__ */ jsx(Link, {
|
|
242
|
+
href: item.href,
|
|
243
|
+
children: item.label
|
|
244
|
+
}, `${item.label}-${item.href}`) : /* @__PURE__ */ jsx(Typography, {
|
|
245
|
+
color: item.current ? "text.primary" : "text.secondary",
|
|
246
|
+
"aria-current": item.current ? "page" : void 0,
|
|
247
|
+
children: item.label
|
|
248
|
+
}, `${item.label}-${item.href ?? "current"}`))
|
|
249
|
+
});
|
|
250
|
+
}
|
|
251
|
+
//#endregion
|
|
252
|
+
//#region packages/console-ui/src/resource/index.tsx
|
|
253
|
+
function ResourceLink({ resource, href, external = false, disabled = false, ariaLabel, children, className, testId }) {
|
|
254
|
+
const resolvedHref = href ?? resource.route;
|
|
255
|
+
const content = children ?? resource.name;
|
|
256
|
+
const label = ariaLabel ?? `${resource.kind ?? "Resource"} ${resource.name}`;
|
|
257
|
+
if (disabled || !resolvedHref) return /* @__PURE__ */ jsx(Typography, {
|
|
258
|
+
component: "span",
|
|
259
|
+
"aria-label": label,
|
|
260
|
+
"aria-disabled": disabled ? "true" : void 0,
|
|
261
|
+
className,
|
|
262
|
+
"data-testid": testId,
|
|
263
|
+
children: content
|
|
264
|
+
});
|
|
265
|
+
return /* @__PURE__ */ jsx(Link, {
|
|
266
|
+
href: resolvedHref,
|
|
267
|
+
target: external ? "_blank" : void 0,
|
|
268
|
+
rel: external ? "noreferrer" : void 0,
|
|
269
|
+
"aria-label": label,
|
|
270
|
+
className,
|
|
271
|
+
"data-testid": testId,
|
|
272
|
+
children: content
|
|
273
|
+
});
|
|
274
|
+
}
|
|
275
|
+
function ResourceIcon({ kind, label, icon, decorative = false, className, testId }) {
|
|
276
|
+
return /* @__PURE__ */ jsx(Typography, {
|
|
277
|
+
component: "span",
|
|
278
|
+
role: decorative ? "presentation" : "img",
|
|
279
|
+
"aria-label": decorative ? void 0 : label ?? kind ?? "Resource",
|
|
280
|
+
"aria-hidden": decorative ? "true" : void 0,
|
|
281
|
+
className,
|
|
282
|
+
"data-testid": testId,
|
|
283
|
+
sx: {
|
|
284
|
+
display: "inline-flex",
|
|
285
|
+
alignItems: "center",
|
|
286
|
+
lineHeight: 1
|
|
287
|
+
},
|
|
288
|
+
children: icon ?? kind?.slice(0, 1).toUpperCase() ?? "•"
|
|
289
|
+
});
|
|
290
|
+
}
|
|
291
|
+
const chipTone = {
|
|
292
|
+
neutral: "default",
|
|
293
|
+
info: "info",
|
|
294
|
+
success: "success",
|
|
295
|
+
warning: "warning",
|
|
296
|
+
error: "error"
|
|
297
|
+
};
|
|
298
|
+
function ResourceStatus({ status, icon, className, testId }) {
|
|
299
|
+
const chip = /* @__PURE__ */ jsx(Chip, {
|
|
300
|
+
role: "status",
|
|
301
|
+
label: status.label,
|
|
302
|
+
color: chipTone[status.tone],
|
|
303
|
+
icon,
|
|
304
|
+
className,
|
|
305
|
+
"data-testid": testId
|
|
306
|
+
});
|
|
307
|
+
return status.description ? /* @__PURE__ */ jsx(Tooltip, {
|
|
308
|
+
title: status.description,
|
|
309
|
+
children: chip
|
|
310
|
+
}) : chip;
|
|
311
|
+
}
|
|
312
|
+
//#endregion
|
|
313
|
+
export { AsyncBoundary, Breadcrumbs, EmptyState, ErrorState, FieldValue, LoadingState, PageSection, PageToolbar, ResourceIcon, ResourceLink, ResourceStatus, TagList, TruncatedText };
|
|
314
|
+
|
|
315
|
+
//# sourceMappingURL=index.js.map
|
package/index.js.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","names":[],"sources":["../../src/feedback/index.tsx","../../src/field/index.tsx","../../src/layout/index.tsx","../../src/resource/index.tsx"],"sourcesContent":["import Alert from '@mui/material/Alert';\nimport Box from '@mui/material/Box';\nimport Button from '@mui/material/Button';\nimport CircularProgress from '@mui/material/CircularProgress';\nimport Stack from '@mui/material/Stack';\nimport Typography from '@mui/material/Typography';\nimport type { ReactNode } from 'react';\n\nimport type { AsyncBoundaryState, ContentProps } from '../types';\n\nexport interface LoadingStateProps extends ContentProps {\n label?: string;\n}\n\nexport function LoadingState({\n label = 'Loading',\n className,\n testId,\n}: LoadingStateProps) {\n return (\n <Stack\n role=\"status\"\n aria-label={label}\n aria-live=\"polite\"\n className={className}\n data-testid={testId}\n sx={{ minHeight: 96, p: 2, alignItems: 'center', justifyContent: 'center', gap: 1 }}\n >\n <CircularProgress size={24} aria-hidden=\"true\" />\n <Typography variant=\"body2\" color=\"text.secondary\">\n {label}\n </Typography>\n </Stack>\n );\n}\n\nexport interface EmptyStateProps extends ContentProps {\n title?: ReactNode;\n description?: ReactNode;\n action?: ReactNode;\n}\n\nexport function EmptyState({\n title = 'No data',\n description,\n action,\n className,\n testId,\n}: EmptyStateProps) {\n return (\n <Stack\n role=\"status\"\n className={className}\n data-testid={testId}\n sx={{ p: 3, textAlign: 'center', alignItems: 'center', gap: 1 }}\n >\n <Typography variant=\"h6\">{title}</Typography>\n {description && (\n <Typography color=\"text.secondary\" variant=\"body2\">\n {description}\n </Typography>\n )}\n {action}\n </Stack>\n );\n}\n\nexport interface ErrorStateProps extends ContentProps {\n title?: ReactNode;\n message?: ReactNode;\n onRetry?: () => void;\n retryLabel?: string;\n}\n\nexport function ErrorState({\n title = 'Something went wrong',\n message,\n onRetry,\n retryLabel = 'Retry',\n className,\n testId,\n}: ErrorStateProps) {\n return (\n <Alert\n severity=\"error\"\n role=\"alert\"\n className={className}\n data-testid={testId}\n action={\n onRetry ? (\n <Button color=\"inherit\" size=\"small\" onClick={onRetry}>\n {retryLabel}\n </Button>\n ) : undefined\n }\n >\n <Typography component=\"span\" sx={{ fontWeight: 600 }}>\n {title}\n </Typography>\n {message && (\n <Box component=\"span\" sx={{ display: 'block', mt: 0.5 }}>\n {message}\n </Box>\n )}\n </Alert>\n );\n}\n\nexport interface AsyncBoundaryProps extends ContentProps {\n state: AsyncBoundaryState;\n loading?: ReactNode;\n empty?: ReactNode;\n error?: ReactNode;\n forbidden?: ReactNode;\n unavailable?: ReactNode;\n onRetry?: () => void;\n}\n\nexport function AsyncBoundary({\n state,\n children,\n loading,\n empty,\n error,\n forbidden,\n unavailable,\n onRetry,\n className,\n testId,\n}: AsyncBoundaryProps) {\n const content = (() => {\n switch (state) {\n case 'loading':\n return loading ?? <LoadingState />;\n case 'empty':\n return empty ?? <EmptyState />;\n case 'error':\n return error ?? <ErrorState onRetry={onRetry} />;\n case 'forbidden':\n return forbidden ?? (\n <EmptyState\n title=\"Access denied\"\n description=\"You do not have permission to view this content.\"\n />\n );\n case 'unavailable':\n return unavailable ?? (\n <ErrorState\n title=\"Unavailable\"\n message=\"This content is temporarily unavailable.\"\n onRetry={onRetry}\n />\n );\n case 'ready':\n return children;\n }\n })();\n\n return (\n <Box className={className} data-testid={testId}>\n {content}\n </Box>\n );\n}\n","import Button from '@mui/material/Button';\nimport Chip from '@mui/material/Chip';\nimport Stack from '@mui/material/Stack';\nimport Tooltip from '@mui/material/Tooltip';\nimport Typography from '@mui/material/Typography';\nimport type { ReactNode } from 'react';\n\nimport type { ContentProps } from '../types';\n\nexport interface FieldValueProps extends ContentProps {\n label?: ReactNode;\n value?: ReactNode;\n copyable?: boolean;\n copyValue?: string;\n onCopy?: (value: string) => void;\n emptyLabel?: ReactNode;\n}\n\nexport function FieldValue({\n label,\n value,\n copyable = false,\n copyValue,\n onCopy,\n emptyLabel = '—',\n className,\n testId,\n}: FieldValueProps) {\n const hasValue = value !== undefined && value !== null && value !== '';\n const handleCopy = () => {\n if (!copyValue) return;\n onCopy?.(copyValue);\n void navigator.clipboard?.writeText(copyValue);\n };\n\n return (\n <Stack className={className} data-testid={testId} sx={{ gap: 0.5 }}>\n {label && (\n <Typography color=\"text.secondary\" variant=\"caption\">\n {label}\n </Typography>\n )}\n <Stack sx={{ flexDirection: 'row', alignItems: 'center', gap: 1, minWidth: 0 }}>\n <Typography component=\"span\" variant=\"body2\" sx={{ minWidth: 0 }}>\n {hasValue ? value : emptyLabel}\n </Typography>\n {copyable && copyValue && (\n <Button size=\"small\" onClick={handleCopy} aria-label=\"Copy value\">\n Copy\n </Button>\n )}\n </Stack>\n </Stack>\n );\n}\n\nexport interface TruncatedTextProps extends ContentProps {\n text: string;\n maxLines?: number;\n}\n\nexport function TruncatedText({\n text,\n maxLines = 1,\n className,\n testId,\n}: TruncatedTextProps) {\n return (\n <Tooltip title={text}>\n <Typography\n component=\"span\"\n className={className}\n data-testid={testId}\n sx={{\n display: '-webkit-box',\n overflow: 'hidden',\n WebkitBoxOrient: 'vertical',\n WebkitLineClamp: maxLines,\n }}\n >\n {text}\n </Typography>\n </Tooltip>\n );\n}\n\nexport interface TagListProps extends ContentProps {\n tags: readonly string[];\n maxVisible?: number;\n ariaLabel?: string;\n}\n\nexport function TagList({\n tags,\n maxVisible,\n ariaLabel = 'Tags',\n className,\n testId,\n}: TagListProps) {\n const visibleTags = maxVisible === undefined ? tags : tags.slice(0, maxVisible);\n const remaining = tags.length - visibleTags.length;\n\n return (\n <Stack\n component=\"span\"\n role=\"list\"\n aria-label={ariaLabel}\n className={className}\n data-testid={testId}\n sx={{ flexDirection: 'row', flexWrap: 'wrap', gap: 0.5 }}\n >\n {visibleTags.map((tag, index) => (\n <Chip component=\"span\" role=\"listitem\" key={`${tag}-${index}`} label={tag} size=\"small\" />\n ))}\n {remaining > 0 && (\n <Chip\n component=\"span\"\n role=\"listitem\"\n label={`+${remaining} more`}\n size=\"small\"\n aria-label={`${remaining} more tags`}\n />\n )}\n </Stack>\n );\n}\n","import BreadcrumbsMui from '@mui/material/Breadcrumbs';\nimport Box from '@mui/material/Box';\nimport Link from '@mui/material/Link';\nimport Stack from '@mui/material/Stack';\nimport Typography from '@mui/material/Typography';\nimport type { ReactNode } from 'react';\n\nimport type { BreadcrumbItem, ContentProps } from '../types';\n\nexport interface PageSectionProps extends ContentProps {\n title?: ReactNode;\n description?: ReactNode;\n actions?: ReactNode;\n}\n\nexport function PageSection({\n title,\n description,\n actions,\n children,\n className,\n testId,\n}: PageSectionProps) {\n return (\n <Box component=\"section\" className={className} data-testid={testId}>\n {(title || description || actions) && (\n <Stack\n sx={{\n flexDirection: 'row',\n alignItems: 'flex-start',\n justifyContent: 'space-between',\n gap: 2,\n mb: 2,\n }}\n >\n <Box>\n {title && <Typography variant=\"h6\">{title}</Typography>}\n {description && (\n <Typography color=\"text.secondary\" variant=\"body2\">\n {description}\n </Typography>\n )}\n </Box>\n {actions && <Box>{actions}</Box>}\n </Stack>\n )}\n {children}\n </Box>\n );\n}\n\nexport interface PageToolbarProps extends ContentProps {\n ariaLabel?: string;\n}\n\nexport function PageToolbar({\n ariaLabel = 'Page actions',\n children,\n className,\n testId,\n}: PageToolbarProps) {\n return (\n <Stack\n component=\"div\"\n role=\"toolbar\"\n aria-label={ariaLabel}\n className={className}\n data-testid={testId}\n sx={{\n flexDirection: 'row',\n alignItems: 'center',\n flexWrap: 'wrap',\n gap: 1,\n }}\n >\n {children}\n </Stack>\n );\n}\n\nexport interface BreadcrumbsProps extends ContentProps {\n items: readonly BreadcrumbItem[];\n ariaLabel?: string;\n}\n\nexport function Breadcrumbs({\n items,\n ariaLabel = 'Breadcrumbs',\n className,\n testId,\n}: BreadcrumbsProps) {\n return (\n <BreadcrumbsMui\n aria-label={ariaLabel}\n className={className}\n data-testid={testId}\n >\n {items.map(item =>\n item.href && !item.current ? (\n <Link key={`${item.label}-${item.href}`} href={item.href}>\n {item.label}\n </Link>\n ) : (\n <Typography\n key={`${item.label}-${item.href ?? 'current'}`}\n color={item.current ? 'text.primary' : 'text.secondary'}\n aria-current={item.current ? 'page' : undefined}\n >\n {item.label}\n </Typography>\n ),\n )}\n </BreadcrumbsMui>\n );\n}\n","import Chip from '@mui/material/Chip';\nimport Link from '@mui/material/Link';\nimport Tooltip from '@mui/material/Tooltip';\nimport Typography from '@mui/material/Typography';\nimport type { ReactElement, ReactNode } from 'react';\n\nimport type {\n ContentProps,\n ResourceRef,\n ResourceStatusTone,\n ResourceStatusValue,\n} from '../types';\n\nexport interface ResourceLinkProps extends ContentProps {\n resource: ResourceRef;\n href?: string;\n external?: boolean;\n disabled?: boolean;\n ariaLabel?: string;\n}\n\nexport function ResourceLink({\n resource,\n href,\n external = false,\n disabled = false,\n ariaLabel,\n children,\n className,\n testId,\n}: ResourceLinkProps) {\n const resolvedHref = href ?? resource.route;\n const content = children ?? resource.name;\n const label = ariaLabel ?? `${resource.kind ?? 'Resource'} ${resource.name}`;\n\n if (disabled || !resolvedHref) {\n return (\n <Typography\n component=\"span\"\n aria-label={label}\n aria-disabled={disabled ? 'true' : undefined}\n className={className}\n data-testid={testId}\n >\n {content}\n </Typography>\n );\n }\n\n return (\n <Link\n href={resolvedHref}\n target={external ? '_blank' : undefined}\n rel={external ? 'noreferrer' : undefined}\n aria-label={label}\n className={className}\n data-testid={testId}\n >\n {content}\n </Link>\n );\n}\n\nexport interface ResourceIconProps extends ContentProps {\n kind?: string;\n label?: string;\n icon?: ReactNode;\n decorative?: boolean;\n}\n\nexport function ResourceIcon({\n kind,\n label,\n icon,\n decorative = false,\n className,\n testId,\n}: ResourceIconProps) {\n const accessibleLabel = label ?? kind ?? 'Resource';\n return (\n <Typography\n component=\"span\"\n role={decorative ? 'presentation' : 'img'}\n aria-label={decorative ? undefined : accessibleLabel}\n aria-hidden={decorative ? 'true' : undefined}\n className={className}\n data-testid={testId}\n sx={{ display: 'inline-flex', alignItems: 'center', lineHeight: 1 }}\n >\n {icon ?? kind?.slice(0, 1).toUpperCase() ?? '•'}\n </Typography>\n );\n}\n\nconst chipTone: Record<ResourceStatusTone, 'default' | 'info' | 'success' | 'warning' | 'error'> = {\n neutral: 'default',\n info: 'info',\n success: 'success',\n warning: 'warning',\n error: 'error',\n};\n\nexport interface ResourceStatusProps extends ContentProps {\n status: ResourceStatusValue;\n icon?: ReactElement;\n}\n\nexport function ResourceStatus({\n status,\n icon,\n className,\n testId,\n}: ResourceStatusProps) {\n const chip = (\n <Chip\n role=\"status\"\n label={status.label}\n color={chipTone[status.tone]}\n icon={icon}\n className={className}\n data-testid={testId}\n />\n );\n\n return status.description ? (\n <Tooltip title={status.description}>{chip}</Tooltip>\n ) : (\n chip\n );\n}\n"],"mappings":";;;;;;;;;;;;AAcA,SAAgB,aAAa,EAC3B,QAAQ,WACR,WACA,UACoB;CACpB,OACE,q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D;EACE,WAAU;EACV,MAAM,aAAa,iBAAiB;EACpC,cAAY,aAAa,KAAA,IALL,SAAS,QAAQ;EAMrC,eAAa,aAAa,SAAS,KAAA;EACxB;EACX,eAAa;EACb,IAAI;GAAE,SAAS;GAAe,YAAY;GAAU,YAAY;EAAE;EAEjE,UAAA,QAAQ,MAAM,MAAM,GAAG,CAAC,CAAC,CAAC,YAAY,KAAK;CAClC,CAAA;AAEhB;AAEA,MAAM,WAA6F;CACjG,SAAS;CACT,MAAM;CACN,SAAS;CACT,SAAS;CACT,OAAO;AACT;AAOA,SAAgB,eAAe,EAC7B,QACA,MACA,WACA,UACsB;CACtB,MAAM,OACJ,oBAAC,MAAD;EACE,MAAK;EACL,OAAO,OAAO;EACd,OAAO,SAAS,OAAO;EACjB;EACK;EACX,eAAa;CACd,CAAA;CAGH,OAAO,OAAO,cACZ,oBAAC,SAAD;EAAS,OAAO,OAAO;EAAc,UAAA;CAAc,CAAA,IAEnD;AAEJ"}
|
package/package.json
ADDED
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@alauda/console-ui",
|
|
3
|
+
"version": "0.1.0-next.20260731.1785490048",
|
|
4
|
+
"description": "Semantic React UI facade for ACP Console plugins.",
|
|
5
|
+
"type": "module",
|
|
6
|
+
"main": "./index.js",
|
|
7
|
+
"module": "./index.js",
|
|
8
|
+
"types": "./index.d.ts",
|
|
9
|
+
"exports": {
|
|
10
|
+
".": {
|
|
11
|
+
"types": "./index.d.ts",
|
|
12
|
+
"import": "./index.js",
|
|
13
|
+
"default": "./index.js"
|
|
14
|
+
}
|
|
15
|
+
},
|
|
16
|
+
"files": [
|
|
17
|
+
"index.js",
|
|
18
|
+
"index.js.map",
|
|
19
|
+
"index.d.ts",
|
|
20
|
+
"README.md"
|
|
21
|
+
],
|
|
22
|
+
"dependencies": {},
|
|
23
|
+
"peerDependencies": {
|
|
24
|
+
"@emotion/react": "^11.0.0",
|
|
25
|
+
"@emotion/styled": "^11.0.0",
|
|
26
|
+
"@mui/material": "^9.2.0",
|
|
27
|
+
"react": "^18.0.0 || ^19.0.0",
|
|
28
|
+
"react-dom": "^18.0.0 || ^19.0.0"
|
|
29
|
+
},
|
|
30
|
+
"publishConfig": {
|
|
31
|
+
"access": "public"
|
|
32
|
+
}
|
|
33
|
+
}
|