@next-bricks/ai-portal 0.70.0 → 0.70.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.
Files changed (148) hide show
  1. package/dist/bricks.json +42 -42
  2. package/dist/chunks/7202.a893b0e6.js.map +1 -1
  3. package/dist/chunks/action-buttons.68666920.js.map +1 -1
  4. package/dist/chunks/activity-timeline.96e7aaea.js.map +1 -1
  5. package/dist/chunks/ai-agents.cffd08a0.js.map +1 -1
  6. package/dist/chunks/ai-employees.267c3626.js.map +1 -1
  7. package/dist/chunks/blank-state.648eea95.js.map +1 -1
  8. package/dist/chunks/chat-input.444c80bb.js.map +1 -1
  9. package/dist/chunks/chat-panel-welcome.2f7c6c8b.js.map +1 -1
  10. package/dist/chunks/chat-panel.3160f2e8.js.map +1 -1
  11. package/dist/chunks/chat-stream.393c8241.js.map +1 -1
  12. package/dist/chunks/cruise-canvas.bfae3138.js.map +1 -1
  13. package/dist/chunks/dropdown-select.336442ba.js.map +1 -1
  14. package/dist/chunks/elevo-card.49b42ed0.js.map +1 -1
  15. package/dist/chunks/elevo-logo.25e3b889.js.map +1 -1
  16. package/dist/chunks/elevo-sidebar.a197a77f.js.map +1 -1
  17. package/dist/chunks/flow-tabs.ee1290c2.js.map +1 -1
  18. package/dist/chunks/goal-card-list.74ab5767.js.map +1 -1
  19. package/dist/chunks/home-container.f1829834.js.map +1 -1
  20. package/dist/chunks/icon-button.545ffb24.js.map +1 -1
  21. package/dist/chunks/mcp-tools.f132c502.js.map +1 -1
  22. package/dist/chunks/notice-dropdown.63cb2415.js.map +1 -1
  23. package/dist/chunks/page-container.2185f2e0.js.map +1 -1
  24. package/dist/chunks/preview-container.a0ca6e2f.js.map +1 -1
  25. package/dist/chunks/project-knowledges.51731410.js.map +1 -1
  26. package/dist/chunks/running-flow.37a428cf.js.map +1 -1
  27. package/dist/chunks/show-case.44e995fc.js.map +1 -1
  28. package/dist/chunks/show-cases.c3921ea0.js.map +1 -1
  29. package/dist/chunks/space-chat-guide.84f4a1e7.js.map +1 -1
  30. package/dist/chunks/space-logo.994f7a25.js.map +1 -1
  31. package/dist/chunks/space-workbench.8c064898.js.map +1 -1
  32. package/dist/chunks/stage-flow.9b6fad93.js.map +1 -1
  33. package/dist/chunks/stat-with-mini-chart.1509cf8c.js.map +1 -1
  34. package/dist/chunks/sticky-container.d3f7054e.js.map +1 -1
  35. package/dist/chunks/tab-list.ee97567f.js.map +1 -1
  36. package/dist/examples.json +52 -40
  37. package/dist/{index.8e0adc27.js → index.94998c36.js} +2 -2
  38. package/dist/{index.8e0adc27.js.map → index.94998c36.js.map} +1 -1
  39. package/dist/manifest.json +594 -313
  40. package/dist/types.json +796 -796
  41. package/dist-types/action-buttons/index.d.ts +10 -1
  42. package/dist-types/activity-timeline/index.d.ts +10 -1
  43. package/dist-types/ai-agents/index.d.ts +10 -1
  44. package/dist-types/ai-employees/index.d.ts +16 -1
  45. package/dist-types/blank-state/index.d.ts +10 -1
  46. package/dist-types/chat-input/index.d.ts +37 -1
  47. package/dist-types/chat-panel/index.d.ts +45 -3
  48. package/dist-types/chat-stream/index.d.ts +62 -1
  49. package/dist-types/cruise-canvas/index.d.ts +71 -1
  50. package/dist-types/dropdown-select/index.d.ts +3 -1
  51. package/dist-types/elevo-card/index.d.ts +5 -1
  52. package/dist-types/elevo-logo/index.d.ts +3 -1
  53. package/dist-types/elevo-sidebar/index.d.ts +19 -2
  54. package/dist-types/flow-tabs/index.d.ts +5 -1
  55. package/dist-types/gantt-chart/index.d.ts +3 -1
  56. package/dist-types/goal-card-list/index.d.ts +8 -1
  57. package/dist-types/home-container/index.d.ts +4 -1
  58. package/dist-types/icon-button/index.d.ts +4 -1
  59. package/dist-types/mcp-tools/index.d.ts +3 -1
  60. package/dist-types/page-container/index.d.ts +7 -0
  61. package/dist-types/preview-container/index.d.ts +4 -0
  62. package/dist-types/project-knowledges/index.d.ts +5 -0
  63. package/dist-types/running-flow/index.d.ts +3 -0
  64. package/dist-types/show-case/index.d.ts +5 -0
  65. package/dist-types/show-cases/index.d.ts +4 -0
  66. package/dist-types/space-workbench/chat-panel-welcome/index.d.ts +3 -0
  67. package/dist-types/space-workbench/index.d.ts +7 -0
  68. package/dist-types/space-workbench/space-chat-guide/index.d.ts +3 -0
  69. package/dist-types/space-workbench/space-logo/index.d.ts +1 -0
  70. package/dist-types/stage-flow/index.d.ts +21 -0
  71. package/dist-types/stat-with-mini-chart/index.d.ts +10 -0
  72. package/dist-types/sticky-container/index.d.ts +3 -0
  73. package/dist-types/tab-list/index.d.ts +4 -0
  74. package/docs/action-buttons.md +59 -10
  75. package/docs/action-buttons.react.md +80 -0
  76. package/docs/activity-timeline.md +51 -7
  77. package/docs/activity-timeline.react.md +109 -0
  78. package/docs/ai-agents.md +62 -2
  79. package/docs/ai-agents.react.md +73 -0
  80. package/docs/ai-employees.md +76 -2
  81. package/docs/ai-employees.react.md +106 -0
  82. package/docs/blank-state.md +62 -2
  83. package/docs/blank-state.react.md +77 -0
  84. package/docs/chat-box.md +134 -52
  85. package/docs/chat-box.react.md +142 -0
  86. package/docs/chat-input.md +117 -1
  87. package/docs/chat-input.react.md +117 -0
  88. package/docs/chat-panel-welcome.md +39 -0
  89. package/docs/chat-panel-welcome.react.md +41 -0
  90. package/docs/chat-panel.md +86 -3
  91. package/docs/chat-panel.react.md +109 -0
  92. package/docs/chat-stream.md +149 -2
  93. package/docs/chat-stream.react.md +155 -0
  94. package/docs/cruise-canvas.md +159 -0
  95. package/docs/cruise-canvas.react.md +159 -0
  96. package/docs/dropdown-select.md +37 -8
  97. package/docs/dropdown-select.react.md +144 -0
  98. package/docs/elevo-card.md +75 -1
  99. package/docs/elevo-card.react.md +104 -0
  100. package/docs/elevo-logo.md +13 -1
  101. package/docs/elevo-logo.react.md +27 -0
  102. package/docs/elevo-sidebar.md +150 -1
  103. package/docs/elevo-sidebar.react.md +149 -0
  104. package/docs/flow-tabs.md +97 -2
  105. package/docs/flow-tabs.react.md +102 -0
  106. package/docs/gantt-chart.md +101 -0
  107. package/docs/gantt-chart.react.md +125 -0
  108. package/docs/goal-card-list.md +149 -13
  109. package/docs/goal-card-list.react.md +185 -0
  110. package/docs/home-container.md +48 -2
  111. package/docs/home-container.react.md +51 -0
  112. package/docs/icon-button.md +128 -2
  113. package/docs/icon-button.react.md +120 -0
  114. package/docs/mcp-tools.md +105 -2
  115. package/docs/mcp-tools.react.md +117 -0
  116. package/docs/notice-dropdown.md +53 -10
  117. package/docs/notice-dropdown.react.md +167 -0
  118. package/docs/notice-list.md +53 -5
  119. package/docs/notice-list.react.md +121 -0
  120. package/docs/page-container.md +80 -3
  121. package/docs/page-container.react.md +83 -0
  122. package/docs/preview-container.md +22 -32
  123. package/docs/preview-container.react.md +71 -0
  124. package/docs/project-conversations.md +85 -4
  125. package/docs/project-conversations.react.md +110 -0
  126. package/docs/project-knowledges.md +73 -8
  127. package/docs/project-knowledges.react.md +85 -0
  128. package/docs/running-flow.md +57 -2
  129. package/docs/running-flow.react.md +90 -0
  130. package/docs/show-case.md +48 -3
  131. package/docs/show-case.react.md +60 -0
  132. package/docs/show-cases.md +52 -2
  133. package/docs/show-cases.react.md +92 -0
  134. package/docs/space-chat-guide.md +32 -0
  135. package/docs/space-chat-guide.react.md +39 -0
  136. package/docs/space-logo.md +53 -0
  137. package/docs/space-logo.react.md +46 -0
  138. package/docs/space-workbench.md +45 -2
  139. package/docs/space-workbench.react.md +102 -0
  140. package/docs/stage-flow.md +122 -26
  141. package/docs/stage-flow.react.md +112 -0
  142. package/docs/stat-with-mini-chart.md +64 -159
  143. package/docs/stat-with-mini-chart.react.md +113 -0
  144. package/docs/sticky-container.md +56 -3
  145. package/docs/sticky-container.react.md +60 -0
  146. package/docs/tab-list.md +74 -3
  147. package/docs/tab-list.react.md +73 -0
  148. package/package.json +2 -2
@@ -0,0 +1,112 @@
1
+ ---
2
+ tagName: ai-portal.stage-flow
3
+ displayName: WrappedAiPortalStageFlow
4
+ description: 阶段流程编辑器构件,支持以泳道方式展示和编辑服务流的阶段与活动。
5
+ category: ""
6
+ source: "@next-bricks/ai-portal"
7
+ ---
8
+
9
+ # WrappedAiPortalStageFlow
10
+
11
+ > 阶段流程编辑器构件,支持以泳道方式展示和编辑服务流的阶段与活动。
12
+
13
+ ## 导入
14
+
15
+ ```tsx
16
+ import { WrappedAiPortalStageFlow } from "@easyops/wrapped-components";
17
+ ```
18
+
19
+ ## Props
20
+
21
+ | 属性 | 类型 | 必填 | 默认值 | 说明 |
22
+ | ----------- | -------------- | ---- | ------ | ------------------------------------------------ |
23
+ | spec | `Stage[]` | 否 | - | 阶段流程配置数据,每个阶段包含名称和活动列表 |
24
+ | aiEmployees | `AIEmployee[]` | 否 | - | AI 员工列表,用于在活动中显示分配的员工名称 |
25
+ | readOnly | `boolean` | 否 | - | 是否为只读模式,只读时不显示编辑、添加、删除操作 |
26
+
27
+ ## Events
28
+
29
+ | 事件 | detail | 说明 |
30
+ | -------------- | --------------------------------------------------------------------------------------- | -------------------------- |
31
+ | onChange | `Stage[]` — 更新后的阶段列表 | 流程阶段数据发生变化时触发 |
32
+ | onAddActivity | `{ stage: Stage }` — { stage: 所属阶段数据 } | 点击添加活动按钮时触发 |
33
+ | onEditActivity | `EditActivityDetail` — { stage: 所属阶段, activity: 活动数据, activityIndex: 活动索引 } | 点击活动进行编辑时触发 |
34
+
35
+ ## Methods
36
+
37
+ | 方法 | 参数 | 返回值 | 说明 |
38
+ | -------------- | ----------------------------------------------------------------------- | ------ | ------------------------ |
39
+ | addActivity | `(stage: Stage, activity: FlowActivity) => void` | `void` | 向指定阶段添加活动 |
40
+ | editActivity | `(stage: Stage, activity: FlowActivity, activityIndex: number) => void` | `void` | 编辑指定阶段中的某个活动 |
41
+ | deleteActivity | `(stage: Stage, activityIndex: number) => void` | `void` | 删除指定阶段中的某个活动 |
42
+
43
+ ## Examples
44
+
45
+ ### 基础使用
46
+
47
+ 以泳道方式展示服务流的阶段和活动,支持分配 AI 员工。
48
+
49
+ ```tsx
50
+ <WrappedAiPortalStageFlow
51
+ spec={[
52
+ {
53
+ name: "Requirement",
54
+ serviceFlowActivities: [
55
+ { name: "Requirement collects", aiEmployeeId: "employee-001" },
56
+ { name: "Requirement documents", aiEmployeeId: "employee-001" },
57
+ ],
58
+ },
59
+ { name: "Sprint Planning" },
60
+ ]}
61
+ aiEmployees={[{ employeeId: "employee-001", name: "Samuel" }]}
62
+ onChange={(e) => console.log("流程变更:", e.detail)}
63
+ onAddActivity={(e) => console.log("添加活动:", e.detail)}
64
+ onEditActivity={(e) => console.log("编辑活动:", e.detail)}
65
+ />
66
+ ```
67
+
68
+ ### 只读模式
69
+
70
+ 设置 readOnly 后不显示编辑、添加、删除操作。
71
+
72
+ ```tsx
73
+ <WrappedAiPortalStageFlow
74
+ readOnly={true}
75
+ spec={[
76
+ {
77
+ name: "需求阶段",
78
+ serviceFlowActivities: [
79
+ { name: "需求收集", aiEmployeeId: "employee-001" },
80
+ { name: "需求评审", aiEmployeeId: "employee-002" },
81
+ ],
82
+ },
83
+ {
84
+ name: "开发阶段",
85
+ serviceFlowActivities: [
86
+ { name: "编码实现", aiEmployeeId: "employee-001" },
87
+ ],
88
+ },
89
+ ]}
90
+ aiEmployees={[
91
+ { employeeId: "employee-001", name: "Alice" },
92
+ { employeeId: "employee-002", name: "Bob" },
93
+ ]}
94
+ />
95
+ ```
96
+
97
+ ### 使用方法调用
98
+
99
+ 通过 ref 调用方法动态添加、编辑、删除活动。
100
+
101
+ ```tsx
102
+ const ref = useRef<any>();
103
+
104
+ <WrappedAiPortalStageFlow
105
+ ref={ref}
106
+ spec={[{ name: "阶段一", serviceFlowActivities: [{ name: "活动A" }] }]}
107
+ onChange={(e) => console.log(e.detail)}
108
+ />
109
+ <button onClick={() => ref.current?.addActivity({ name: "阶段一" }, { name: "新活动B" })}>
110
+ 添加活动
111
+ </button>
112
+ ```
@@ -1,8 +1,35 @@
1
- 构件 `ai-portal.stat-with-mini-chart`
1
+ ---
2
+ tagName: ai-portal.stat-with-mini-chart
3
+ displayName: WrappedAiPortalStatWithMiniChart
4
+ description: 带迷你折线图的统计数据展示构件,在统计数值旁边渲染一个迷你折线图。
5
+ category: ""
6
+ source: "@next-bricks/ai-portal"
7
+ ---
8
+
9
+ # ai-portal.stat-with-mini-chart
10
+
11
+ > 带迷你折线图的统计数据展示构件,在统计数值旁边渲染一个迷你折线图。
12
+
13
+ ## Props
14
+
15
+ | 属性 | 类型 | 必填 | 默认值 | 说明 |
16
+ | --------- | -------------------------- | ---- | ---------------------- | --------------------------------------------------- |
17
+ | label | `string` | 否 | - | 统计指标标签名称 |
18
+ | value | `string` | 否 | - | 统计数值文本 |
19
+ | size | `"medium" \| "small"` | 否 | `"medium"` | 展示尺寸,medium 时图表高度为 92px,small 时为 55px |
20
+ | lineColor | `string` | 否 | `"var(--color-brand)"` | 折线颜色 |
21
+ | showArea | `boolean` | 否 | - | 是否在折线下方显示渐变填充区域 |
22
+ | min | `number` | 否 | - | 指定 y 轴最小值,未指定时从数据中计算 |
23
+ | max | `number` | 否 | - | 指定 y 轴最大值,未指定时从数据中计算 |
24
+ | xField | `string` | 否 | `"0"` | x 轴字段名(数据中时间字段的 key) |
25
+ | yField | `string` | 否 | `"1"` | y 轴字段名(数据中数值字段的 key) |
26
+ | data | `Record<string, number>[]` | 否 | - | 图表数据源,每项为包含 xField 和 yField 字段的对象 |
2
27
 
3
28
  ## Examples
4
29
 
5
- ### Basic
30
+ ### 基础使用(medium 尺寸)
31
+
32
+ 展示带标签、数值和迷你折线图的统计卡片,默认 medium 尺寸。
6
33
 
7
34
  ```yaml preview
8
35
  brick: ai-portal.stat-with-mini-chart
@@ -31,89 +58,13 @@ properties:
31
58
  time: 1730610000
32
59
  - request_total: 550.2
33
60
  time: 1730611800
34
- - request_total: 556.5666666666667
35
- time: 1730613600
36
- - request_total: 565.6333333333333
37
- time: 1730615400
38
- - request_total: 586.5666666666667
39
- time: 1730617200
40
- - request_total: 611.7
41
- time: 1730619000
42
- - request_total: 540.0645161290323
43
- time: 1730620800
44
- - request_total: 595.9333333333333
45
- time: 1730622600
46
- - request_total: 560.0333333333333
47
- time: 1730624400
48
- - request_total: 565.2333333333333
49
- time: 1730626200
50
- - request_total: 609.5806451612904
51
- time: 1730628000
52
- - request_total: 598.8
53
- time: 1730629800
54
- - request_total: 594.5333333333333
55
- time: 1730631600
56
- - request_total: 525.7
57
- time: 1730633400
58
- - request_total: 602.3666666666667
59
- time: 1730635200
60
- - request_total: 557.7333333333333
61
- time: 1730637000
62
- - request_total: 595.8666666666667
63
- time: 1730638800
64
- - request_total: 638.7
65
- time: 1730640600
66
- - request_total: 635.8333333333334
67
- time: 1730642400
68
- - request_total: 563.9
69
- time: 1730644200
70
- - request_total: 606.4516129032259
71
- time: 1730646000
72
- - request_total: 660.1
73
- time: 1730647800
74
- - request_total: 606.2666666666667
75
- time: 1730649600
76
- - request_total: 504.43333333333334
77
- time: 1730651400
78
- - request_total: 651.7333333333333
79
- time: 1730653200
80
- - request_total: 583.5
81
- time: 1730655000
82
- - request_total: 566.2333333333333
83
- time: 1730656800
84
- - request_total: 519.2333333333333
85
- time: 1730658600
86
- - request_total: 621.6333333333333
87
- time: 1730660400
88
- - request_total: 530.9333333333333
89
- time: 1730662200
90
- - request_total: 685.3
91
- time: 1730664000
92
- - request_total: 616.3333333333334
93
- time: 1730665800
94
- - request_total: 580.3333333333334
95
- time: 1730667600
96
- - request_total: 568.5666666666667
97
- time: 1730669400
98
- - request_total: 619.3
99
- time: 1730671200
100
- - request_total: 636.2333333333333
101
- time: 1730673000
102
- - request_total: 630.4666666666667
103
- time: 1730674800
104
- - request_total: 621.4666666666667
105
- time: 1730676600
106
- - request_total: 587.5333333333333
107
- time: 1730678400
108
- - request_total: 542.8666666666667
109
- time: 1730680200
110
- - request_total: 579
111
- time: 1730682000
112
61
  - request_total: 563.5
113
62
  time: 1730683800
114
63
  ```
115
64
 
116
- ### Size
65
+ ### Small 尺寸
66
+
67
+ small 尺寸时图表高度为 55px,标签和数值紧凑排列在图表左侧。
117
68
 
118
69
  ```yaml preview
119
70
  brick: ai-portal.stat-with-mini-chart
@@ -143,84 +94,38 @@ properties:
143
94
  time: 1730610000
144
95
  - request_total: 550.2
145
96
  time: 1730611800
146
- - request_total: 556.5666666666667
147
- time: 1730613600
148
- - request_total: 565.6333333333333
149
- time: 1730615400
150
- - request_total: 586.5666666666667
151
- time: 1730617200
152
- - request_total: 611.7
153
- time: 1730619000
154
- - request_total: 540.0645161290323
155
- time: 1730620800
156
- - request_total: 595.9333333333333
157
- time: 1730622600
158
- - request_total: 560.0333333333333
159
- time: 1730624400
160
- - request_total: 565.2333333333333
161
- time: 1730626200
162
- - request_total: 609.5806451612904
163
- time: 1730628000
164
- - request_total: 598.8
165
- time: 1730629800
166
- - request_total: 594.5333333333333
167
- time: 1730631600
168
- - request_total: 525.7
169
- time: 1730633400
170
- - request_total: 602.3666666666667
171
- time: 1730635200
172
- - request_total: 557.7333333333333
173
- time: 1730637000
174
- - request_total: 595.8666666666667
175
- time: 1730638800
176
- - request_total: 638.7
177
- time: 1730640600
178
- - request_total: 635.8333333333334
179
- time: 1730642400
180
- - request_total: 563.9
181
- time: 1730644200
182
- - request_total: 606.4516129032259
183
- time: 1730646000
184
- - request_total: 660.1
185
- time: 1730647800
186
- - request_total: 606.2666666666667
187
- time: 1730649600
188
- - request_total: 504.43333333333334
189
- time: 1730651400
190
- - request_total: 651.7333333333333
191
- time: 1730653200
192
- - request_total: 583.5
193
- time: 1730655000
194
- - request_total: 566.2333333333333
195
- time: 1730656800
196
- - request_total: 519.2333333333333
197
- time: 1730658600
198
- - request_total: 621.6333333333333
199
- time: 1730660400
200
- - request_total: 530.9333333333333
201
- time: 1730662200
202
- - request_total: 685.3
203
- time: 1730664000
204
- - request_total: 616.3333333333334
205
- time: 1730665800
206
- - request_total: 580.3333333333334
207
- time: 1730667600
208
- - request_total: 568.5666666666667
209
- time: 1730669400
210
- - request_total: 619.3
211
- time: 1730671200
212
- - request_total: 636.2333333333333
213
- time: 1730673000
214
- - request_total: 630.4666666666667
215
- time: 1730674800
216
- - request_total: 621.4666666666667
217
- time: 1730676600
218
- - request_total: 587.5333333333333
219
- time: 1730678400
220
- - request_total: 542.8666666666667
221
- time: 1730680200
222
- - request_total: 579
223
- time: 1730682000
224
97
  - request_total: 563.5
225
98
  time: 1730683800
226
99
  ```
100
+
101
+ ### 带填充区域和 y 轴范围
102
+
103
+ 开启 showArea 并指定 min/max 固定 y 轴范围。
104
+
105
+ ```yaml preview
106
+ brick: ai-portal.stat-with-mini-chart
107
+ properties:
108
+ label: CPU 使用率
109
+ value: "78.5%"
110
+ xField: time
111
+ yField: cpu
112
+ lineColor: "#FF6B6B"
113
+ showArea: true
114
+ min: 0
115
+ max: 100
116
+ data:
117
+ - cpu: 65.2
118
+ time: 1730597995
119
+ - cpu: 72.1
120
+ time: 1730599200
121
+ - cpu: 78.5
122
+ time: 1730601000
123
+ - cpu: 80.3
124
+ time: 1730602800
125
+ - cpu: 75.6
126
+ time: 1730604600
127
+ - cpu: 70.2
128
+ time: 1730606400
129
+ - cpu: 78.5
130
+ time: 1730608200
131
+ ```
@@ -0,0 +1,113 @@
1
+ ---
2
+ tagName: ai-portal.stat-with-mini-chart
3
+ displayName: WrappedAiPortalStatWithMiniChart
4
+ description: 带迷你折线图的统计数据展示构件,在统计数值旁边渲染一个迷你折线图。
5
+ category: ""
6
+ source: "@next-bricks/ai-portal"
7
+ ---
8
+
9
+ # WrappedAiPortalStatWithMiniChart
10
+
11
+ > 带迷你折线图的统计数据展示构件,在统计数值旁边渲染一个迷你折线图。
12
+
13
+ ## 导入
14
+
15
+ ```tsx
16
+ import { WrappedAiPortalStatWithMiniChart } from "@easyops/wrapped-components";
17
+ ```
18
+
19
+ ## Props
20
+
21
+ | 属性 | 类型 | 必填 | 默认值 | 说明 |
22
+ | --------- | -------------------------- | ---- | ---------------------- | --------------------------------------------------- |
23
+ | label | `string` | 否 | - | 统计指标标签名称 |
24
+ | value | `string` | 否 | - | 统计数值文本 |
25
+ | size | `"medium" \| "small"` | 否 | `"medium"` | 展示尺寸,medium 时图表高度为 92px,small 时为 55px |
26
+ | lineColor | `string` | 否 | `"var(--color-brand)"` | 折线颜色 |
27
+ | showArea | `boolean` | 否 | - | 是否在折线下方显示渐变填充区域 |
28
+ | min | `number` | 否 | - | 指定 y 轴最小值,未指定时从数据中计算 |
29
+ | max | `number` | 否 | - | 指定 y 轴最大值,未指定时从数据中计算 |
30
+ | xField | `string` | 否 | `"0"` | x 轴字段名(数据中时间字段的 key) |
31
+ | yField | `string` | 否 | `"1"` | y 轴字段名(数据中数值字段的 key) |
32
+ | data | `Record<string, number>[]` | 否 | - | 图表数据源,每项为包含 xField 和 yField 字段的对象 |
33
+
34
+ ## Examples
35
+
36
+ ### 基础使用(medium 尺寸)
37
+
38
+ 展示带标签、数值和迷你折线图的统计卡片,默认 medium 尺寸。
39
+
40
+ ```tsx
41
+ <WrappedAiPortalStatWithMiniChart
42
+ label="请求数"
43
+ value="563.5"
44
+ xField="time"
45
+ yField="request_total"
46
+ lineColor="#295DFF"
47
+ data={[
48
+ { request_total: 642.2, time: 1730597995.403 },
49
+ { request_total: 621.3, time: 1730599200 },
50
+ { request_total: 600.2, time: 1730601000 },
51
+ { request_total: 601.97, time: 1730602800 },
52
+ { request_total: 592.4, time: 1730604600 },
53
+ { request_total: 567.87, time: 1730606400 },
54
+ { request_total: 651.33, time: 1730608200 },
55
+ { request_total: 571.97, time: 1730610000 },
56
+ { request_total: 550.2, time: 1730611800 },
57
+ { request_total: 563.5, time: 1730683800 },
58
+ ]}
59
+ />
60
+ ```
61
+
62
+ ### Small 尺寸
63
+
64
+ small 尺寸时图表高度为 55px,标签和数值紧凑排列在图表左侧。
65
+
66
+ ```tsx
67
+ <WrappedAiPortalStatWithMiniChart
68
+ label="请求数"
69
+ value="563.5"
70
+ size="small"
71
+ xField="time"
72
+ yField="request_total"
73
+ lineColor="#295DFF"
74
+ data={[
75
+ { request_total: 642.2, time: 1730597995.403 },
76
+ { request_total: 621.3, time: 1730599200 },
77
+ { request_total: 600.2, time: 1730601000 },
78
+ { request_total: 601.97, time: 1730602800 },
79
+ { request_total: 592.4, time: 1730604600 },
80
+ { request_total: 567.87, time: 1730606400 },
81
+ { request_total: 651.33, time: 1730608200 },
82
+ { request_total: 571.97, time: 1730610000 },
83
+ { request_total: 550.2, time: 1730611800 },
84
+ { request_total: 563.5, time: 1730683800 },
85
+ ]}
86
+ />
87
+ ```
88
+
89
+ ### 带填充区域和 y 轴范围
90
+
91
+ 开启 showArea 并指定 min/max 固定 y 轴范围。
92
+
93
+ ```tsx
94
+ <WrappedAiPortalStatWithMiniChart
95
+ label="CPU 使用率"
96
+ value="78.5%"
97
+ xField="time"
98
+ yField="cpu"
99
+ lineColor="#FF6B6B"
100
+ showArea={true}
101
+ min={0}
102
+ max={100}
103
+ data={[
104
+ { cpu: 65.2, time: 1730597995 },
105
+ { cpu: 72.1, time: 1730599200 },
106
+ { cpu: 78.5, time: 1730601000 },
107
+ { cpu: 80.3, time: 1730602800 },
108
+ { cpu: 75.6, time: 1730604600 },
109
+ { cpu: 70.2, time: 1730606400 },
110
+ { cpu: 78.5, time: 1730608200 },
111
+ ]}
112
+ />
113
+ ```
@@ -1,11 +1,64 @@
1
- 构件 `ai-portal.sticky-container`
1
+ ---
2
+ tagName: ai-portal.sticky-container
3
+ displayName: WrappedAiPortalStickyContainer
4
+ description: 粘性容器构件,使内容在页面滚动时固定在顶部。
5
+ category: ""
6
+ source: "@next-bricks/ai-portal"
7
+ ---
8
+
9
+ # ai-portal.sticky-container
10
+
11
+ > 粘性容器构件,使内容在页面滚动时固定在顶部。
12
+
13
+ ## Props
14
+
15
+ | 属性 | 类型 | 必填 | 默认值 | 说明 |
16
+ | ------- | --------------------- | ---- | ----------- | -------------------------------------------------------------- |
17
+ | variant | `"default" \| "home"` | 否 | `"default"` | 变体风格,通过 CSS attribute selector 控制样式,不触发重新渲染 |
18
+
19
+ ## Slots
20
+
21
+ | 名称 | 说明 |
22
+ | --------- | ------ |
23
+ | (default) | 内容 |
24
+ | header | 头部 |
25
+ | toolbar | 工具栏 |
2
26
 
3
27
  ## Examples
4
28
 
5
- ### Basic
29
+ ### 基础使用
30
+
31
+ 将内容放入粘性容器,页面滚动时内容固定在顶部。
32
+
33
+ ```yaml preview
34
+ brick: ai-portal.sticky-container
35
+ children:
36
+ - brick: div
37
+ properties:
38
+ textContent: "这段内容会在滚动时保持固定"
39
+ style:
40
+ padding: "16px"
41
+ background: "var(--antd-color-bg-container)"
42
+ ```
43
+
44
+ ### Home 变体
45
+
46
+ 使用 home 变体风格,适用于首页场景。
6
47
 
7
48
  ```yaml preview
8
49
  brick: ai-portal.sticky-container
9
50
  properties:
10
- textContent: Hello world
51
+ variant: home
52
+ children:
53
+ - brick: div
54
+ slot: header
55
+ properties:
56
+ textContent: "头部内容"
57
+ style:
58
+ padding: "8px 16px"
59
+ - brick: div
60
+ properties:
61
+ textContent: "主体内容"
62
+ style:
63
+ padding: "16px"
11
64
  ```
@@ -0,0 +1,60 @@
1
+ ---
2
+ tagName: ai-portal.sticky-container
3
+ displayName: WrappedAiPortalStickyContainer
4
+ description: 粘性容器构件,使内容在页面滚动时固定在顶部。
5
+ category: ""
6
+ source: "@next-bricks/ai-portal"
7
+ ---
8
+
9
+ # WrappedAiPortalStickyContainer
10
+
11
+ > 粘性容器构件,使内容在页面滚动时固定在顶部。
12
+
13
+ ## 导入
14
+
15
+ ```tsx
16
+ import { WrappedAiPortalStickyContainer } from "@easyops/wrapped-components";
17
+ ```
18
+
19
+ ## Props
20
+
21
+ | 属性 | 类型 | 必填 | 默认值 | 说明 |
22
+ | ------- | --------------------- | ---- | ----------- | -------------------------------------------------------------- |
23
+ | variant | `"default" \| "home"` | 否 | `"default"` | 变体风格,通过 CSS attribute selector 控制样式,不触发重新渲染 |
24
+
25
+ ## Slots
26
+
27
+ | 名称 | 说明 |
28
+ | --------- | ------ |
29
+ | (default) | 内容 |
30
+ | header | 头部 |
31
+ | toolbar | 工具栏 |
32
+
33
+ ## Examples
34
+
35
+ ### 基础使用
36
+
37
+ 将内容放入粘性容器,页面滚动时内容固定在顶部。
38
+
39
+ ```tsx
40
+ <WrappedAiPortalStickyContainer>
41
+ <div
42
+ style={{ padding: "16px", background: "var(--antd-color-bg-container)" }}
43
+ >
44
+ 这段内容会在滚动时保持固定
45
+ </div>
46
+ </WrappedAiPortalStickyContainer>
47
+ ```
48
+
49
+ ### Home 变体
50
+
51
+ 使用 home 变体风格,适用于首页场景。
52
+
53
+ ```tsx
54
+ <WrappedAiPortalStickyContainer variant="home">
55
+ <div slot="header" style={{ padding: "8px 16px" }}>
56
+ 头部内容
57
+ </div>
58
+ <div style={{ padding: "16px" }}>主体内容</div>
59
+ </WrappedAiPortalStickyContainer>
60
+ ```
package/docs/tab-list.md CHANGED
@@ -1,11 +1,82 @@
1
- 构件 `ai-portal.tab-list`
1
+ ---
2
+ tagName: ai-portal.tab-list
3
+ displayName: WrappedAiPortalTabList
4
+ description: 标签页列表构件,展示可切换的标签页,点击后触发事件并自动更新选中状态。
5
+ category: ""
6
+ source: "@next-bricks/ai-portal"
7
+ ---
8
+
9
+ # ai-portal.tab-list
10
+
11
+ > 标签页列表构件,展示可切换的标签页,点击后触发事件并自动更新选中状态。
12
+
13
+ ## Props
14
+
15
+ | 属性 | 类型 | 必填 | 默认值 | 说明 |
16
+ | --------- | -------- | ---- | ------ | ------------------------------------ |
17
+ | tabs | `Tab[]` | 否 | - | 标签页配置列表,每项包含 id 和 label |
18
+ | activeTab | `string` | 否 | - | 当前激活的标签页 id |
19
+
20
+ ## Events
21
+
22
+ | 事件 | detail | 说明 |
23
+ | --------- | ------------------------------------------- | ---------------------------------------- |
24
+ | tab.click | `Tab` — { id: 标签页ID, label: 标签页标题 } | 点击标签页时触发,同时自动更新 activeTab |
25
+
26
+ ## CSS Parts
27
+
28
+ | 名称 | 说明 |
29
+ | ---- | ---------------------- |
30
+ | tabs | The tab list container |
31
+ | tab | The individual tab |
2
32
 
3
33
  ## Examples
4
34
 
5
- ### Basic
35
+ ### 基础使用
36
+
37
+ 展示可切换的标签页列表,点击后自动切换选中状态。
6
38
 
7
39
  ```yaml preview
8
40
  brick: ai-portal.tab-list
9
41
  properties:
10
- textContent: Hello world
42
+ tabs:
43
+ - id: "all"
44
+ label: "全部"
45
+ - id: "host"
46
+ label: "主机故障排查"
47
+ - id: "inspect"
48
+ label: "主机巡检"
49
+ activeTab: "all"
50
+ events:
51
+ tab.click:
52
+ action: console.log
53
+ args:
54
+ - "标签点击:"
55
+ - "<% EVENT.detail %>"
56
+ ```
57
+
58
+ ### 与内容联动
59
+
60
+ 结合事件监听,点击标签页时切换显示对应内容(通过 target 更新属性)。
61
+
62
+ ```yaml preview
63
+ - brick: ai-portal.tab-list
64
+ properties:
65
+ tabs:
66
+ - id: "tab1"
67
+ label: "Tab 1"
68
+ - id: "tab2"
69
+ label: "Tab 2"
70
+ activeTab: "tab1"
71
+ events:
72
+ tab.click:
73
+ target: "#content"
74
+ properties:
75
+ textContent: "<% '当前 Tab: ' + EVENT.detail.label %>"
76
+ - brick: div
77
+ id: content
78
+ properties:
79
+ textContent: "当前 Tab: Tab 1"
80
+ style:
81
+ padding: "16px"
11
82
  ```