@agentiffai/design 0.1.7 → 0.1.9
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/{StreamStatusIndicator-DM5n4MI1.d.cts → Window-CF5y1_Og.d.cts} +111 -106
- package/dist/{StreamStatusIndicator-DM5n4MI1.d.ts → Window-CF5y1_Og.d.ts} +111 -106
- package/dist/copilotkit/index.cjs +2465 -2276
- package/dist/copilotkit/index.cjs.map +1 -1
- package/dist/copilotkit/index.d.cts +63 -46
- package/dist/copilotkit/index.d.ts +63 -46
- package/dist/copilotkit/index.js +2463 -2275
- package/dist/copilotkit/index.js.map +1 -1
- package/dist/icons/index.cjs +68 -167
- package/dist/icons/index.cjs.map +1 -1
- package/dist/icons/index.d.cts +25 -20
- package/dist/icons/index.d.ts +25 -20
- package/dist/icons/index.js +68 -167
- package/dist/icons/index.js.map +1 -1
- package/dist/index.cjs +5968 -3620
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +364 -4
- package/dist/index.d.ts +364 -4
- package/dist/index.js +5917 -3590
- package/dist/index.js.map +1 -1
- package/dist/layout/index.cjs +1000 -525
- package/dist/layout/index.cjs.map +1 -1
- package/dist/layout/index.d.cts +70 -8
- package/dist/layout/index.d.ts +70 -8
- package/dist/layout/index.js +997 -523
- package/dist/layout/index.js.map +1 -1
- package/dist/theme/index.cjs +345 -24
- package/dist/theme/index.cjs.map +1 -1
- package/dist/theme/index.d.cts +524 -65
- package/dist/theme/index.d.ts +524 -65
- package/dist/theme/index.js +345 -24
- package/dist/theme/index.js.map +1 -1
- package/dist/workflow/index.cjs +870 -575
- package/dist/workflow/index.cjs.map +1 -1
- package/dist/workflow/index.d.cts +93 -57
- package/dist/workflow/index.d.ts +93 -57
- package/dist/workflow/index.js +866 -572
- package/dist/workflow/index.js.map +1 -1
- package/package.json +1 -1
- package/public/assets/icon-set/Icon-contacts-fill.svg +3 -0
- package/public/assets/icon-set/Icon-mail-open-fill.svg +3 -0
- package/public/assets/icon-set/Icon-p2p-fill.svg +3 -0
- package/public/assets/icon-set/Icon-robot-2-fill.svg +3 -0
- package/public/assets/icon-set/Icon-send-plane-fill.svg +3 -0
- package/public/assets/icon-set/Notion.svg +41 -0
- package/public/assets/icon-set/Postiz.svg +1 -0
- package/public/assets/avatar-transparent-bg.png +0 -0
package/dist/workflow/index.js
CHANGED
|
@@ -1,203 +1,590 @@
|
|
|
1
|
-
import
|
|
1
|
+
import styled2, { keyframes } from 'styled-components';
|
|
2
2
|
import { jsxs, jsx } from 'react/jsx-runtime';
|
|
3
3
|
import { useState } from 'react';
|
|
4
4
|
|
|
5
|
-
// src/components/workflow/
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
5
|
+
// src/components/workflow/WorkflowCard.tsx
|
|
6
|
+
|
|
7
|
+
// src/theme/tokens.ts
|
|
8
|
+
var tokens = {
|
|
9
|
+
colors: {
|
|
10
|
+
// Sea Green (additional brand color)
|
|
11
|
+
// Backgrounds - dark theme optimized
|
|
12
|
+
background: {
|
|
13
|
+
// Discord gray (preserved)
|
|
14
|
+
dark: "#1b2230",
|
|
15
|
+
// Discord surface gray (preserved)
|
|
16
|
+
light: "#252d3d"
|
|
17
|
+
// Discord border gray (preserved)
|
|
18
|
+
},
|
|
19
|
+
// Text hierarchy
|
|
20
|
+
text: {
|
|
21
|
+
primary: "#FFFFFF",
|
|
22
|
+
secondary: "#B4B8C5",
|
|
23
|
+
tertiary: "#6B7280"},
|
|
24
|
+
// Teal (brand aligned)
|
|
25
|
+
error: "#EF4444",
|
|
26
|
+
warning: "#F59E0B",
|
|
27
|
+
info: "#459FB9",
|
|
28
|
+
// Sky Blue (brand aligned)
|
|
29
|
+
// Status colors (for workflow/SSE events)
|
|
30
|
+
status: {
|
|
31
|
+
pending: "#6B7280",
|
|
32
|
+
running: "#459FB9",
|
|
33
|
+
// Sky Blue (brand aligned)
|
|
34
|
+
completed: "#2CB0AB",
|
|
35
|
+
// Teal (brand aligned)
|
|
36
|
+
failed: "#EF4444",
|
|
37
|
+
timeout: "#F59E0B"},
|
|
38
|
+
// Surface variants (for overlays, cards, panels)
|
|
39
|
+
surface: {
|
|
40
|
+
overlay: "rgba(255, 255, 255, 0.05)",
|
|
41
|
+
overlayHover: "rgba(255, 255, 255, 0.1)",
|
|
42
|
+
overlayActive: "rgba(255, 255, 255, 0.15)",
|
|
43
|
+
subtle: "rgba(255, 255, 255, 0.02)"},
|
|
44
|
+
// UI Element colors
|
|
45
|
+
border: {
|
|
46
|
+
default: "rgba(255, 255, 255, 0.1)",
|
|
47
|
+
subtle: "rgba(255, 255, 255, 0.05)",
|
|
48
|
+
hover: "rgba(255, 255, 255, 0.2)",
|
|
49
|
+
focus: "#2CB0AB"},
|
|
50
|
+
// Scrollbar colors
|
|
51
|
+
scrollbar: {
|
|
52
|
+
track: "transparent",
|
|
53
|
+
thumb: "rgba(255, 255, 255, 0.2)",
|
|
54
|
+
thumbHover: "rgba(255, 255, 255, 0.3)"
|
|
55
|
+
},
|
|
56
|
+
// Overlays and backdrops
|
|
57
|
+
overlay: "rgba(0, 0, 0, 0.5)"},
|
|
58
|
+
typography: {
|
|
59
|
+
fontFamily: {
|
|
60
|
+
primary: "'Roboto', -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Helvetica Neue', sans-serif",
|
|
61
|
+
monospace: "'Roboto Mono', 'Monaco', 'Menlo', 'Ubuntu Mono', monospace"
|
|
62
|
+
},
|
|
63
|
+
fontSize: {
|
|
64
|
+
xs: "0.75rem",
|
|
65
|
+
// 12px
|
|
66
|
+
sm: "0.875rem",
|
|
67
|
+
// 14px
|
|
68
|
+
base: "1rem"},
|
|
69
|
+
fontWeight: {
|
|
70
|
+
medium: 500,
|
|
71
|
+
semibold: 600},
|
|
72
|
+
lineHeight: {
|
|
73
|
+
tight: 1.25,
|
|
74
|
+
normal: 1.5}
|
|
75
|
+
},
|
|
76
|
+
spacing: {
|
|
77
|
+
xs: "0.25rem",
|
|
78
|
+
// 4px
|
|
79
|
+
sm: "0.5rem",
|
|
80
|
+
// 8px
|
|
81
|
+
md: "1rem",
|
|
82
|
+
// 16px
|
|
83
|
+
lg: "1.5rem",
|
|
84
|
+
// 24px
|
|
85
|
+
xl: "2rem"},
|
|
86
|
+
borderRadius: {
|
|
87
|
+
sm: "0.25rem",
|
|
88
|
+
// 4px
|
|
89
|
+
md: "0.5rem",
|
|
90
|
+
// 8px
|
|
91
|
+
lg: "0.75rem",
|
|
92
|
+
// 24px
|
|
93
|
+
full: "9999px"
|
|
94
|
+
// Fully rounded
|
|
95
|
+
},
|
|
96
|
+
shadows: {
|
|
97
|
+
xl: "0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04)"},
|
|
98
|
+
transitions: {
|
|
99
|
+
fast: "150ms ease-in-out",
|
|
100
|
+
normal: "250ms ease-in-out"},
|
|
101
|
+
zIndex: {
|
|
102
|
+
modal: 1200}};
|
|
103
|
+
var WorkflowCard = ({
|
|
104
|
+
id,
|
|
105
|
+
name,
|
|
106
|
+
description,
|
|
107
|
+
integrations = [],
|
|
108
|
+
requiresInput = false,
|
|
109
|
+
onClick,
|
|
110
|
+
disabled = false,
|
|
111
|
+
className
|
|
112
|
+
}) => {
|
|
113
|
+
const missingCount = integrations.filter((i) => i.connected === false).length;
|
|
114
|
+
const hasFooter = integrations.length > 0 || requiresInput;
|
|
115
|
+
return /* @__PURE__ */ jsxs(
|
|
116
|
+
Card,
|
|
117
|
+
{
|
|
118
|
+
"data-testid": `workflow-card-${id}`,
|
|
119
|
+
onClick: disabled ? void 0 : onClick,
|
|
120
|
+
disabled,
|
|
121
|
+
className,
|
|
122
|
+
type: "button",
|
|
123
|
+
children: [
|
|
124
|
+
/* @__PURE__ */ jsx(WorkflowName, { "data-testid": "workflow-card-name", children: name }),
|
|
125
|
+
description && /* @__PURE__ */ jsx(Description, { children: description }),
|
|
126
|
+
hasFooter && /* @__PURE__ */ jsxs(CardFooter, { children: [
|
|
127
|
+
/* @__PURE__ */ jsx(IntegrationList, { children: integrations.map((integration) => /* @__PURE__ */ jsx(
|
|
128
|
+
IntegrationIconWrapper,
|
|
129
|
+
{
|
|
130
|
+
$connected: integration.connected !== false,
|
|
131
|
+
title: `${integration.name}${integration.connected === false ? " (not connected)" : ""}`,
|
|
132
|
+
children: /* @__PURE__ */ jsx(
|
|
133
|
+
IntegrationIcon,
|
|
134
|
+
{
|
|
135
|
+
src: integration.icon,
|
|
136
|
+
alt: integration.name
|
|
137
|
+
}
|
|
138
|
+
)
|
|
139
|
+
},
|
|
140
|
+
integration.name
|
|
141
|
+
)) }),
|
|
142
|
+
/* @__PURE__ */ jsxs(Indicators, { children: [
|
|
143
|
+
missingCount > 0 && /* @__PURE__ */ jsxs(
|
|
144
|
+
IndicatorPill,
|
|
145
|
+
{
|
|
146
|
+
$variant: "warning",
|
|
147
|
+
title: `${missingCount} integration${missingCount > 1 ? "s" : ""} not connected`,
|
|
148
|
+
children: [
|
|
149
|
+
/* @__PURE__ */ jsx(IndicatorDot, { $variant: "warning" }),
|
|
150
|
+
/* @__PURE__ */ jsxs(IndicatorText, { children: [
|
|
151
|
+
missingCount,
|
|
152
|
+
" missing"
|
|
153
|
+
] })
|
|
154
|
+
]
|
|
155
|
+
}
|
|
156
|
+
),
|
|
157
|
+
requiresInput && /* @__PURE__ */ jsxs(IndicatorPill, { $variant: "info", title: "Requires input", children: [
|
|
158
|
+
/* @__PURE__ */ jsx(IndicatorDot, { $variant: "info" }),
|
|
159
|
+
/* @__PURE__ */ jsx(IndicatorText, { children: "Input required" })
|
|
160
|
+
] })
|
|
161
|
+
] })
|
|
162
|
+
] })
|
|
163
|
+
]
|
|
164
|
+
}
|
|
165
|
+
);
|
|
166
|
+
};
|
|
167
|
+
WorkflowCard.displayName = "WorkflowCard";
|
|
168
|
+
var Card = styled2.button`
|
|
169
|
+
display: grid;
|
|
170
|
+
gap: ${tokens.spacing.sm};
|
|
171
|
+
padding: ${tokens.spacing.md};
|
|
172
|
+
background: ${tokens.colors.background.dark};
|
|
173
|
+
border-radius: ${tokens.borderRadius.lg};
|
|
174
|
+
border: 1px solid ${tokens.colors.border.default};
|
|
175
|
+
cursor: pointer;
|
|
176
|
+
text-align: left;
|
|
177
|
+
width: 100%;
|
|
178
|
+
font-family: ${tokens.typography.fontFamily.primary};
|
|
179
|
+
transition: border-color ${tokens.transitions.fast}, background-color ${tokens.transitions.fast};
|
|
180
|
+
|
|
181
|
+
&:hover:not(:disabled) {
|
|
182
|
+
border-color: ${tokens.colors.border.hover};
|
|
183
|
+
background: ${tokens.colors.background.light};
|
|
9
184
|
}
|
|
10
|
-
|
|
11
|
-
|
|
185
|
+
|
|
186
|
+
&:active:not(:disabled) {
|
|
187
|
+
background: ${tokens.colors.surface.overlayActive};
|
|
12
188
|
}
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
189
|
+
|
|
190
|
+
&:focus-visible {
|
|
191
|
+
outline: 2px solid ${tokens.colors.border.focus};
|
|
192
|
+
outline-offset: 2px;
|
|
17
193
|
}
|
|
18
|
-
|
|
194
|
+
|
|
195
|
+
&:disabled {
|
|
19
196
|
opacity: 0.5;
|
|
197
|
+
cursor: not-allowed;
|
|
20
198
|
}
|
|
21
199
|
`;
|
|
22
|
-
var
|
|
200
|
+
var WorkflowName = styled2.h3`
|
|
201
|
+
margin: 0;
|
|
202
|
+
font-size: ${tokens.typography.fontSize.base};
|
|
203
|
+
font-weight: ${tokens.typography.fontWeight.semibold};
|
|
204
|
+
color: ${tokens.colors.text.primary};
|
|
205
|
+
line-height: ${tokens.typography.lineHeight.tight};
|
|
206
|
+
`;
|
|
207
|
+
var Description = styled2.p`
|
|
208
|
+
margin: 0;
|
|
209
|
+
font-size: ${tokens.typography.fontSize.sm};
|
|
210
|
+
color: ${tokens.colors.text.tertiary};
|
|
211
|
+
line-height: ${tokens.typography.lineHeight.normal};
|
|
212
|
+
`;
|
|
213
|
+
var CardFooter = styled2.div`
|
|
214
|
+
display: flex;
|
|
215
|
+
flex-wrap: wrap;
|
|
216
|
+
align-items: center;
|
|
217
|
+
gap: ${tokens.spacing.sm};
|
|
218
|
+
padding-top: ${tokens.spacing.sm};
|
|
219
|
+
border-top: 1px solid ${tokens.colors.border.subtle};
|
|
220
|
+
`;
|
|
221
|
+
var IntegrationList = styled2.div`
|
|
222
|
+
display: flex;
|
|
223
|
+
align-items: center;
|
|
224
|
+
gap: ${tokens.spacing.xs};
|
|
225
|
+
`;
|
|
226
|
+
var IntegrationIconWrapper = styled2.span`
|
|
227
|
+
display: flex;
|
|
228
|
+
align-items: center;
|
|
229
|
+
justify-content: center;
|
|
230
|
+
width: 24px;
|
|
231
|
+
height: 24px;
|
|
232
|
+
border-radius: ${tokens.borderRadius.sm};
|
|
233
|
+
background: ${tokens.colors.background.light};
|
|
234
|
+
opacity: ${({ $connected }) => $connected ? 1 : 0.4};
|
|
235
|
+
position: relative;
|
|
236
|
+
|
|
237
|
+
${({ $connected }) => !$connected && `
|
|
238
|
+
&::after {
|
|
239
|
+
content: '';
|
|
240
|
+
position: absolute;
|
|
241
|
+
inset: 0;
|
|
242
|
+
border: 1px dashed ${tokens.colors.warning};
|
|
243
|
+
border-radius: ${tokens.borderRadius.sm};
|
|
244
|
+
}
|
|
245
|
+
`}
|
|
246
|
+
`;
|
|
247
|
+
var IntegrationIcon = styled2.img`
|
|
248
|
+
width: 16px;
|
|
249
|
+
height: 16px;
|
|
250
|
+
object-fit: contain;
|
|
251
|
+
`;
|
|
252
|
+
var Indicators = styled2.div`
|
|
253
|
+
display: flex;
|
|
254
|
+
align-items: center;
|
|
255
|
+
gap: ${tokens.spacing.sm};
|
|
256
|
+
margin-left: auto;
|
|
257
|
+
`;
|
|
258
|
+
var IndicatorPill = styled2.span`
|
|
23
259
|
display: inline-flex;
|
|
24
260
|
align-items: center;
|
|
25
|
-
gap:
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
}
|
|
261
|
+
gap: 6px;
|
|
262
|
+
padding: 4px 10px;
|
|
263
|
+
border-radius: ${tokens.borderRadius.full};
|
|
264
|
+
background: ${({ $variant }) => $variant === "warning" ? `${tokens.colors.warning}15` : `${tokens.colors.info}15`};
|
|
265
|
+
border: 1px solid ${({ $variant }) => $variant === "warning" ? `${tokens.colors.warning}30` : `${tokens.colors.info}30`};
|
|
266
|
+
`;
|
|
267
|
+
var IndicatorDot = styled2.span`
|
|
268
|
+
width: 6px;
|
|
269
|
+
height: 6px;
|
|
270
|
+
border-radius: ${tokens.borderRadius.full};
|
|
271
|
+
background: ${({ $variant }) => $variant === "warning" ? tokens.colors.warning : tokens.colors.info};
|
|
272
|
+
flex-shrink: 0;
|
|
273
|
+
`;
|
|
274
|
+
var IndicatorText = styled2.span`
|
|
275
|
+
font-size: ${tokens.typography.fontSize.xs};
|
|
276
|
+
font-weight: ${tokens.typography.fontWeight.medium};
|
|
277
|
+
color: ${tokens.colors.text.secondary};
|
|
278
|
+
white-space: nowrap;
|
|
279
|
+
`;
|
|
280
|
+
var severityColors = {
|
|
281
|
+
error: tokens.colors.error,
|
|
282
|
+
warning: tokens.colors.warning,
|
|
283
|
+
info: tokens.colors.info
|
|
284
|
+
};
|
|
285
|
+
var AlertContainer = styled2.div`
|
|
286
|
+
display: flex;
|
|
287
|
+
flex-direction: column;
|
|
288
|
+
background-color: ${(props) => {
|
|
289
|
+
const alpha = props.variant === "modal" ? "26" : props.variant === "banner" ? "1a" : "0d";
|
|
290
|
+
return `${severityColors[props.severity]}${alpha}`;
|
|
35
291
|
}};
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
return "4px 8px";
|
|
40
|
-
case "lg":
|
|
41
|
-
return "8px 16px";
|
|
42
|
-
case "md":
|
|
43
|
-
default:
|
|
44
|
-
return "6px 12px";
|
|
45
|
-
}
|
|
292
|
+
border: 1px solid ${(props) => {
|
|
293
|
+
const alpha = props.variant === "modal" ? "66" : "4d";
|
|
294
|
+
return `${severityColors[props.severity]}${alpha}`;
|
|
46
295
|
}};
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
296
|
+
border-radius: ${(props) => props.variant === "banner" ? "0" : tokens.borderRadius.md};
|
|
297
|
+
padding: ${(props) => props.variant === "modal" ? tokens.spacing.lg : tokens.spacing.md};
|
|
298
|
+
margin: ${(props) => props.variant === "banner" ? "0" : `${tokens.spacing.sm} 0`};
|
|
299
|
+
width: ${(props) => props.variant === "modal" ? "auto" : "100%"};
|
|
300
|
+
max-width: ${(props) => props.variant === "inline" ? "600px" : "100%"};
|
|
301
|
+
font-family: ${tokens.typography.fontFamily.primary};
|
|
302
|
+
`;
|
|
303
|
+
var ModalOverlay = styled2.div`
|
|
304
|
+
position: fixed;
|
|
305
|
+
top: 0;
|
|
306
|
+
left: 0;
|
|
307
|
+
right: 0;
|
|
308
|
+
bottom: 0;
|
|
309
|
+
background-color: ${tokens.colors.overlay};
|
|
310
|
+
display: ${(props) => props.isOpen ? "flex" : "none"};
|
|
311
|
+
align-items: center;
|
|
312
|
+
justify-content: center;
|
|
313
|
+
z-index: ${tokens.zIndex.modal};
|
|
314
|
+
padding: ${tokens.spacing.lg};
|
|
315
|
+
`;
|
|
316
|
+
var ModalContent = styled2.div`
|
|
317
|
+
background-color: ${tokens.colors.background.dark};
|
|
318
|
+
border-radius: ${tokens.borderRadius.lg};
|
|
319
|
+
max-width: 500px;
|
|
320
|
+
width: 100%;
|
|
321
|
+
box-shadow: ${tokens.shadows.xl};
|
|
322
|
+
`;
|
|
323
|
+
var Header = styled2.div`
|
|
324
|
+
display: flex;
|
|
325
|
+
align-items: flex-start;
|
|
326
|
+
gap: ${tokens.spacing.md};
|
|
327
|
+
`;
|
|
328
|
+
var IconContainer = styled2.div`
|
|
329
|
+
flex-shrink: 0;
|
|
330
|
+
width: 24px;
|
|
331
|
+
height: 24px;
|
|
332
|
+
color: ${(props) => severityColors[props.severity]};
|
|
333
|
+
`;
|
|
334
|
+
var Content = styled2.div`
|
|
335
|
+
flex: 1;
|
|
336
|
+
display: flex;
|
|
337
|
+
flex-direction: column;
|
|
338
|
+
gap: ${tokens.spacing.sm};
|
|
339
|
+
`;
|
|
340
|
+
var Title = styled2.div`
|
|
341
|
+
font-size: ${tokens.typography.fontSize.base};
|
|
342
|
+
font-weight: ${tokens.typography.fontWeight.semibold};
|
|
343
|
+
color: ${tokens.colors.text.primary};
|
|
344
|
+
line-height: ${tokens.typography.lineHeight.tight};
|
|
345
|
+
`;
|
|
346
|
+
var ErrorMessage = styled2.div`
|
|
347
|
+
font-size: ${tokens.typography.fontSize.sm};
|
|
348
|
+
line-height: ${tokens.typography.lineHeight.normal};
|
|
349
|
+
color: ${tokens.colors.text.secondary};
|
|
350
|
+
`;
|
|
351
|
+
var ErrorCode = styled2.div`
|
|
352
|
+
font-size: ${tokens.typography.fontSize.xs};
|
|
353
|
+
color: ${tokens.colors.text.secondary};
|
|
354
|
+
font-family: ${tokens.typography.fontFamily.monospace};
|
|
355
|
+
margin-top: ${tokens.spacing.xs};
|
|
356
|
+
`;
|
|
357
|
+
var Timestamp = styled2.div`
|
|
358
|
+
font-size: ${tokens.typography.fontSize.xs};
|
|
359
|
+
color: ${tokens.colors.text.tertiary};
|
|
360
|
+
margin-top: ${tokens.spacing.xs};
|
|
361
|
+
`;
|
|
362
|
+
var Details = styled2.details`
|
|
363
|
+
margin-top: ${tokens.spacing.md};
|
|
364
|
+
cursor: pointer;
|
|
365
|
+
|
|
366
|
+
summary {
|
|
367
|
+
font-size: ${tokens.typography.fontSize.sm};
|
|
368
|
+
font-weight: ${tokens.typography.fontWeight.medium};
|
|
369
|
+
color: ${tokens.colors.text.secondary};
|
|
370
|
+
user-select: none;
|
|
371
|
+
list-style: none;
|
|
372
|
+
display: flex;
|
|
373
|
+
align-items: center;
|
|
374
|
+
gap: ${tokens.spacing.xs};
|
|
375
|
+
|
|
376
|
+
&:hover {
|
|
377
|
+
color: ${tokens.colors.text.primary};
|
|
378
|
+
}
|
|
379
|
+
|
|
380
|
+
&::-webkit-details-marker {
|
|
381
|
+
display: none;
|
|
382
|
+
}
|
|
63
383
|
}
|
|
64
|
-
|
|
384
|
+
`;
|
|
385
|
+
var DetailsIcon = styled2.span`
|
|
386
|
+
display: inline-block;
|
|
387
|
+
transition: transform ${tokens.transitions.fast};
|
|
388
|
+
transform: ${(props) => props.open ? "rotate(90deg)" : "rotate(0deg)"};
|
|
389
|
+
`;
|
|
390
|
+
var StackTrace = styled2.pre`
|
|
391
|
+
margin: ${tokens.spacing.sm} 0 0 0;
|
|
392
|
+
padding: ${tokens.spacing.md};
|
|
393
|
+
background-color: ${tokens.colors.surface.subtle};
|
|
394
|
+
border-radius: ${tokens.borderRadius.sm};
|
|
395
|
+
font-family: ${tokens.typography.fontFamily.monospace};
|
|
396
|
+
font-size: ${tokens.typography.fontSize.xs};
|
|
397
|
+
line-height: ${tokens.typography.lineHeight.normal};
|
|
398
|
+
color: ${tokens.colors.text.secondary};
|
|
399
|
+
white-space: pre-wrap;
|
|
400
|
+
word-break: break-word;
|
|
401
|
+
overflow-x: auto;
|
|
402
|
+
`;
|
|
403
|
+
var Actions = styled2.div`
|
|
404
|
+
display: flex;
|
|
405
|
+
gap: ${tokens.spacing.sm};
|
|
406
|
+
margin-top: ${tokens.spacing.md};
|
|
407
|
+
`;
|
|
408
|
+
var Button = styled2.button`
|
|
409
|
+
display: inline-flex;
|
|
410
|
+
align-items: center;
|
|
411
|
+
gap: ${tokens.spacing.xs};
|
|
412
|
+
padding: ${tokens.spacing.sm} ${tokens.spacing.md};
|
|
413
|
+
font-size: ${tokens.typography.fontSize.sm};
|
|
414
|
+
font-weight: ${tokens.typography.fontWeight.medium};
|
|
415
|
+
color: ${(props) => props.variant === "primary" ? tokens.colors.text.primary : tokens.colors.text.secondary};
|
|
416
|
+
background: ${(props) => props.variant === "primary" ? tokens.colors.error : tokens.colors.surface.overlay};
|
|
65
417
|
border: 1px solid
|
|
66
|
-
${(props) =>
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
case "failed":
|
|
75
|
-
return "rgba(239, 68, 68, 0.3)";
|
|
76
|
-
case "timeout":
|
|
77
|
-
return "rgba(245, 158, 11, 0.3)";
|
|
78
|
-
}
|
|
79
|
-
}};
|
|
80
|
-
border-radius: ${(props) => {
|
|
81
|
-
switch (props.$size) {
|
|
82
|
-
case "sm":
|
|
83
|
-
return "4px";
|
|
84
|
-
case "lg":
|
|
85
|
-
return "8px";
|
|
86
|
-
case "md":
|
|
87
|
-
default:
|
|
88
|
-
return "6px";
|
|
418
|
+
${(props) => props.variant === "primary" ? tokens.colors.error : tokens.colors.border.default};
|
|
419
|
+
border-radius: ${tokens.borderRadius.md};
|
|
420
|
+
cursor: pointer;
|
|
421
|
+
transition: all ${tokens.transitions.fast};
|
|
422
|
+
|
|
423
|
+
&:hover {
|
|
424
|
+
background: ${(props) => props.variant === "primary" ? tokens.colors.error : tokens.colors.surface.overlayHover};
|
|
425
|
+
border-color: ${(props) => props.variant === "primary" ? tokens.colors.error : tokens.colors.border.hover};
|
|
89
426
|
}
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
font-size: ${(props) => {
|
|
94
|
-
switch (props.$size) {
|
|
95
|
-
case "sm":
|
|
96
|
-
return "11px";
|
|
97
|
-
case "lg":
|
|
98
|
-
return "15px";
|
|
99
|
-
case "md":
|
|
100
|
-
default:
|
|
101
|
-
return "13px";
|
|
427
|
+
|
|
428
|
+
&:active {
|
|
429
|
+
transform: scale(0.98);
|
|
102
430
|
}
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
case "pending":
|
|
108
|
-
return "#6B7280";
|
|
109
|
-
case "running":
|
|
110
|
-
return "#3B82F6";
|
|
111
|
-
case "completed":
|
|
112
|
-
return "#10B981";
|
|
113
|
-
case "failed":
|
|
114
|
-
return "#EF4444";
|
|
115
|
-
case "timeout":
|
|
116
|
-
return "#F59E0B";
|
|
431
|
+
|
|
432
|
+
&:disabled {
|
|
433
|
+
opacity: 0.5;
|
|
434
|
+
cursor: not-allowed;
|
|
117
435
|
}
|
|
118
|
-
}};
|
|
119
|
-
line-height: 1.4;
|
|
120
436
|
`;
|
|
121
|
-
var
|
|
437
|
+
var CloseButton = styled2.button`
|
|
438
|
+
position: absolute;
|
|
439
|
+
top: ${tokens.spacing.md};
|
|
440
|
+
right: ${tokens.spacing.md};
|
|
441
|
+
width: 32px;
|
|
442
|
+
height: 32px;
|
|
443
|
+
padding: 0;
|
|
122
444
|
display: flex;
|
|
123
445
|
align-items: center;
|
|
124
446
|
justify-content: center;
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
447
|
+
background: transparent;
|
|
448
|
+
border: none;
|
|
449
|
+
color: ${tokens.colors.text.secondary};
|
|
450
|
+
cursor: pointer;
|
|
451
|
+
border-radius: ${tokens.borderRadius.sm};
|
|
452
|
+
transition: all ${tokens.transitions.fast};
|
|
453
|
+
|
|
454
|
+
&:hover {
|
|
455
|
+
background: ${tokens.colors.surface.overlayHover};
|
|
456
|
+
color: ${tokens.colors.text.primary};
|
|
457
|
+
}
|
|
458
|
+
|
|
459
|
+
&:active {
|
|
460
|
+
transform: scale(0.95);
|
|
461
|
+
}
|
|
462
|
+
|
|
463
|
+
svg {
|
|
464
|
+
width: 20px;
|
|
465
|
+
height: 20px;
|
|
131
466
|
}
|
|
132
|
-
return "none";
|
|
133
|
-
}}
|
|
134
|
-
${(props) => props.$status === "running" ? "1s" : "2s"} linear infinite;
|
|
135
|
-
`;
|
|
136
|
-
var PendingIcon = () => /* @__PURE__ */ jsx("svg", { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", fill: "currentColor", width: "16", height: "16", children: /* @__PURE__ */ jsx("path", { d: "M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm0 18c-4.42 0-8-3.58-8-8s3.58-8 8-8 8 3.58 8 8-3.58 8-8 8zm.5-13H11v6l5.25 3.15.75-1.23-4.5-2.67z" }) });
|
|
137
|
-
var RunningIcon = () => /* @__PURE__ */ jsxs("svg", { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", fill: "currentColor", width: "16", height: "16", children: [
|
|
138
|
-
/* @__PURE__ */ jsx("path", { d: "M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm-2 15l-5-5 1.41-1.41L10 14.17l7.59-7.59L19 8l-9 9z", opacity: "0.3" }),
|
|
139
|
-
/* @__PURE__ */ jsx("path", { d: "M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm0 18c-4.42 0-8-3.58-8-8s3.58-8 8-8 8 3.58 8 8-3.58 8-8 8z" })
|
|
140
|
-
] });
|
|
141
|
-
var CompletedIcon = () => /* @__PURE__ */ jsx("svg", { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", fill: "currentColor", width: "16", height: "16", children: /* @__PURE__ */ jsx("path", { d: "M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm-2 15l-5-5 1.41-1.41L10 14.17l7.59-7.59L19 8l-9 9z" }) });
|
|
142
|
-
var FailedIcon = () => /* @__PURE__ */ jsx("svg", { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", fill: "currentColor", width: "16", height: "16", children: /* @__PURE__ */ jsx("path", { d: "M12 2C6.47 2 2 6.47 2 12s4.47 10 10 10 10-4.47 10-10S17.53 2 12 2zm5 13.59L15.59 17 12 13.41 8.41 17 7 15.59 10.59 12 7 8.41 8.41 7 12 10.59 15.59 7 17 8.41 13.41 12 17 15.59z" }) });
|
|
143
|
-
var TimeoutIcon = () => /* @__PURE__ */ jsx("svg", { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", fill: "currentColor", width: "16", height: "16", children: /* @__PURE__ */ jsx("path", { d: "M1 21h22L12 2 1 21zm12-3h-2v-2h2v2zm0-4h-2v-4h2v4z" }) });
|
|
144
|
-
var Label = styled4.span`
|
|
145
|
-
white-space: nowrap;
|
|
146
467
|
`;
|
|
147
|
-
var
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
return "Failed";
|
|
157
|
-
case "timeout":
|
|
158
|
-
return "Timeout";
|
|
468
|
+
var ErrorIcon = () => /* @__PURE__ */ jsx(
|
|
469
|
+
"svg",
|
|
470
|
+
{
|
|
471
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
472
|
+
viewBox: "0 0 24 24",
|
|
473
|
+
fill: "currentColor",
|
|
474
|
+
width: "24",
|
|
475
|
+
height: "24",
|
|
476
|
+
children: /* @__PURE__ */ jsx("path", { d: "M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm1 15h-2v-2h2v2zm0-4h-2V7h2v6z" })
|
|
159
477
|
}
|
|
160
|
-
|
|
161
|
-
var
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
return /* @__PURE__ */ jsx(FailedIcon, {});
|
|
171
|
-
case "timeout":
|
|
172
|
-
return /* @__PURE__ */ jsx(TimeoutIcon, {});
|
|
478
|
+
);
|
|
479
|
+
var WarningIcon = () => /* @__PURE__ */ jsx(
|
|
480
|
+
"svg",
|
|
481
|
+
{
|
|
482
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
483
|
+
viewBox: "0 0 24 24",
|
|
484
|
+
fill: "currentColor",
|
|
485
|
+
width: "24",
|
|
486
|
+
height: "24",
|
|
487
|
+
children: /* @__PURE__ */ jsx("path", { d: "M1 21h22L12 2 1 21zm12-3h-2v-2h2v2zm0-4h-2v-4h2v4z" })
|
|
173
488
|
}
|
|
174
|
-
|
|
175
|
-
var
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
489
|
+
);
|
|
490
|
+
var InfoIcon = () => /* @__PURE__ */ jsx(
|
|
491
|
+
"svg",
|
|
492
|
+
{
|
|
493
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
494
|
+
viewBox: "0 0 24 24",
|
|
495
|
+
fill: "currentColor",
|
|
496
|
+
width: "24",
|
|
497
|
+
height: "24",
|
|
498
|
+
children: /* @__PURE__ */ jsx("path", { d: "M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm1 15h-2v-6h2v6zm0-8h-2V7h2v2z" })
|
|
499
|
+
}
|
|
500
|
+
);
|
|
501
|
+
var CloseIcon = () => /* @__PURE__ */ jsx("svg", { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", fill: "currentColor", children: /* @__PURE__ */ jsx("path", { d: "M19 6.41L17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12z" }) });
|
|
502
|
+
var ChevronIcon = () => /* @__PURE__ */ jsx(
|
|
503
|
+
"svg",
|
|
504
|
+
{
|
|
505
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
506
|
+
viewBox: "0 0 24 24",
|
|
507
|
+
fill: "currentColor",
|
|
508
|
+
width: "16",
|
|
509
|
+
height: "16",
|
|
510
|
+
children: /* @__PURE__ */ jsx("path", { d: "M10 6L8.59 7.41 13.17 12l-4.58 4.59L10 18l6-6z" })
|
|
511
|
+
}
|
|
512
|
+
);
|
|
513
|
+
var WorkflowErrorAlert = ({
|
|
514
|
+
error,
|
|
515
|
+
errorCode,
|
|
516
|
+
timestamp,
|
|
517
|
+
variant = "inline",
|
|
518
|
+
severity = "error",
|
|
519
|
+
retryable = false,
|
|
520
|
+
onRetry,
|
|
521
|
+
onDismiss,
|
|
522
|
+
showDetails = false,
|
|
523
|
+
stackTrace,
|
|
524
|
+
title,
|
|
182
525
|
className
|
|
183
526
|
}) => {
|
|
184
|
-
const
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
"aria-label": displayLabel,
|
|
193
|
-
children: [
|
|
194
|
-
showIcon && /* @__PURE__ */ jsx(IconContainer, { $animated: animated, $status: status, "aria-hidden": "true", children: getStatusIcon(status) }),
|
|
195
|
-
showLabel && /* @__PURE__ */ jsx(Label, { children: displayLabel })
|
|
196
|
-
]
|
|
527
|
+
const [detailsOpen, setDetailsOpen] = useState(false);
|
|
528
|
+
const [isModalOpen, setIsModalOpen] = useState(variant === "modal");
|
|
529
|
+
const errorMessage = typeof error === "string" ? error : error.message;
|
|
530
|
+
const defaultTitle = severity === "error" ? "Workflow Error" : severity === "warning" ? "Warning" : "Information";
|
|
531
|
+
const displayTitle = title || defaultTitle;
|
|
532
|
+
const handleDismiss = () => {
|
|
533
|
+
if (variant === "modal") {
|
|
534
|
+
setIsModalOpen(false);
|
|
197
535
|
}
|
|
198
|
-
|
|
536
|
+
onDismiss?.();
|
|
537
|
+
};
|
|
538
|
+
const getIcon = () => {
|
|
539
|
+
switch (severity) {
|
|
540
|
+
case "error":
|
|
541
|
+
return /* @__PURE__ */ jsx(ErrorIcon, {});
|
|
542
|
+
case "warning":
|
|
543
|
+
return /* @__PURE__ */ jsx(WarningIcon, {});
|
|
544
|
+
case "info":
|
|
545
|
+
return /* @__PURE__ */ jsx(InfoIcon, {});
|
|
546
|
+
}
|
|
547
|
+
};
|
|
548
|
+
const alertContent = /* @__PURE__ */ jsx(AlertContainer, { variant, severity, className, role: "alert", children: /* @__PURE__ */ jsxs(Header, { children: [
|
|
549
|
+
/* @__PURE__ */ jsx(IconContainer, { severity, "aria-hidden": "true", children: getIcon() }),
|
|
550
|
+
/* @__PURE__ */ jsxs(Content, { children: [
|
|
551
|
+
/* @__PURE__ */ jsx(Title, { children: displayTitle }),
|
|
552
|
+
/* @__PURE__ */ jsx(ErrorMessage, { children: errorMessage }),
|
|
553
|
+
errorCode && /* @__PURE__ */ jsxs(ErrorCode, { children: [
|
|
554
|
+
"Error Code: ",
|
|
555
|
+
errorCode
|
|
556
|
+
] }),
|
|
557
|
+
timestamp && /* @__PURE__ */ jsx(Timestamp, { children: new Date(timestamp).toLocaleString() }),
|
|
558
|
+
showDetails && (stackTrace || typeof error === "object" && error.stack) && /* @__PURE__ */ jsxs(
|
|
559
|
+
Details,
|
|
560
|
+
{
|
|
561
|
+
open: detailsOpen,
|
|
562
|
+
onToggle: (e) => setDetailsOpen(e.target.open),
|
|
563
|
+
children: [
|
|
564
|
+
/* @__PURE__ */ jsxs("summary", { children: [
|
|
565
|
+
/* @__PURE__ */ jsx(DetailsIcon, { open: detailsOpen, children: /* @__PURE__ */ jsx(ChevronIcon, {}) }),
|
|
566
|
+
"Show Details"
|
|
567
|
+
] }),
|
|
568
|
+
/* @__PURE__ */ jsx(StackTrace, { children: stackTrace || (typeof error === "object" ? error.stack : "") })
|
|
569
|
+
]
|
|
570
|
+
}
|
|
571
|
+
),
|
|
572
|
+
(retryable || onDismiss) && /* @__PURE__ */ jsxs(Actions, { children: [
|
|
573
|
+
retryable && onRetry && /* @__PURE__ */ jsx(Button, { variant: "primary", onClick: onRetry, children: "Retry" }),
|
|
574
|
+
onDismiss && /* @__PURE__ */ jsx(Button, { variant: "secondary", onClick: handleDismiss, children: "Dismiss" })
|
|
575
|
+
] })
|
|
576
|
+
] }),
|
|
577
|
+
variant !== "modal" && onDismiss && /* @__PURE__ */ jsx(CloseButton, { onClick: handleDismiss, "aria-label": "Dismiss alert", children: /* @__PURE__ */ jsx(CloseIcon, {}) })
|
|
578
|
+
] }) });
|
|
579
|
+
if (variant === "modal") {
|
|
580
|
+
return /* @__PURE__ */ jsx(ModalOverlay, { isOpen: isModalOpen, onClick: handleDismiss, children: /* @__PURE__ */ jsxs(ModalContent, { onClick: (e) => e.stopPropagation(), children: [
|
|
581
|
+
alertContent,
|
|
582
|
+
/* @__PURE__ */ jsx(CloseButton, { onClick: handleDismiss, "aria-label": "Close modal", children: /* @__PURE__ */ jsx(CloseIcon, {}) })
|
|
583
|
+
] }) });
|
|
584
|
+
}
|
|
585
|
+
return alertContent;
|
|
199
586
|
};
|
|
200
|
-
|
|
587
|
+
WorkflowErrorAlert.displayName = "WorkflowErrorAlert";
|
|
201
588
|
var indeterminate = keyframes`
|
|
202
589
|
0% {
|
|
203
590
|
transform: translateX(-100%);
|
|
@@ -214,106 +601,95 @@ var rotate = keyframes`
|
|
|
214
601
|
transform: rotate(360deg);
|
|
215
602
|
}
|
|
216
603
|
`;
|
|
217
|
-
var
|
|
604
|
+
var statusColors = {
|
|
605
|
+
pending: tokens.colors.status.pending,
|
|
606
|
+
running: tokens.colors.status.running,
|
|
607
|
+
completed: tokens.colors.status.completed,
|
|
608
|
+
failed: tokens.colors.status.failed,
|
|
609
|
+
timeout: tokens.colors.status.timeout
|
|
610
|
+
};
|
|
611
|
+
var Container = styled2.div`
|
|
218
612
|
display: flex;
|
|
219
613
|
flex-direction: column;
|
|
220
|
-
gap:
|
|
614
|
+
gap: ${tokens.spacing.sm};
|
|
221
615
|
width: 100%;
|
|
222
|
-
font-family:
|
|
223
|
-
'Cantarell', 'Fira Sans', 'Droid Sans', 'Helvetica Neue', sans-serif;
|
|
616
|
+
font-family: ${tokens.typography.fontFamily.primary};
|
|
224
617
|
`;
|
|
225
|
-
var ProgressMessage =
|
|
618
|
+
var ProgressMessage = styled2.div`
|
|
226
619
|
font-size: ${(props) => {
|
|
227
620
|
switch (props.size) {
|
|
228
621
|
case "sm":
|
|
229
|
-
return
|
|
622
|
+
return tokens.typography.fontSize.xs;
|
|
230
623
|
case "lg":
|
|
231
|
-
return
|
|
624
|
+
return tokens.typography.fontSize.base;
|
|
232
625
|
case "md":
|
|
233
626
|
default:
|
|
234
|
-
return
|
|
627
|
+
return tokens.typography.fontSize.sm;
|
|
235
628
|
}
|
|
236
629
|
}};
|
|
237
|
-
color:
|
|
238
|
-
line-height:
|
|
630
|
+
color: ${tokens.colors.text.secondary};
|
|
631
|
+
line-height: ${tokens.typography.lineHeight.normal};
|
|
239
632
|
`;
|
|
240
|
-
var ProgressInfo =
|
|
633
|
+
var ProgressInfo = styled2.div`
|
|
241
634
|
display: flex;
|
|
242
635
|
justify-content: space-between;
|
|
243
636
|
align-items: center;
|
|
244
|
-
margin-bottom:
|
|
637
|
+
margin-bottom: ${tokens.spacing.xs};
|
|
245
638
|
`;
|
|
246
|
-
var PercentageText =
|
|
639
|
+
var PercentageText = styled2.span`
|
|
247
640
|
font-size: ${(props) => {
|
|
248
641
|
switch (props.size) {
|
|
249
642
|
case "sm":
|
|
250
|
-
return
|
|
643
|
+
return tokens.typography.fontSize.xs;
|
|
251
644
|
case "lg":
|
|
252
|
-
return
|
|
645
|
+
return tokens.typography.fontSize.base;
|
|
253
646
|
case "md":
|
|
254
647
|
default:
|
|
255
|
-
return
|
|
648
|
+
return tokens.typography.fontSize.sm;
|
|
256
649
|
}
|
|
257
650
|
}};
|
|
258
|
-
font-weight:
|
|
259
|
-
color:
|
|
651
|
+
font-weight: ${tokens.typography.fontWeight.medium};
|
|
652
|
+
color: ${tokens.colors.text.primary};
|
|
260
653
|
`;
|
|
261
|
-
var LinearTrack =
|
|
654
|
+
var LinearTrack = styled2.div`
|
|
262
655
|
position: relative;
|
|
263
656
|
width: 100%;
|
|
264
657
|
height: ${(props) => {
|
|
265
658
|
switch (props.size) {
|
|
266
659
|
case "sm":
|
|
267
|
-
return
|
|
660
|
+
return tokens.spacing.xs;
|
|
268
661
|
case "lg":
|
|
269
|
-
return
|
|
662
|
+
return tokens.spacing.sm;
|
|
270
663
|
case "md":
|
|
271
664
|
default:
|
|
272
665
|
return "6px";
|
|
273
666
|
}
|
|
274
667
|
}};
|
|
275
|
-
background-color:
|
|
276
|
-
border-radius:
|
|
668
|
+
background-color: ${tokens.colors.border.default};
|
|
669
|
+
border-radius: ${tokens.borderRadius.full};
|
|
277
670
|
overflow: hidden;
|
|
278
671
|
`;
|
|
279
|
-
var LinearFill =
|
|
672
|
+
var LinearFill = styled2.div`
|
|
280
673
|
position: absolute;
|
|
281
674
|
top: 0;
|
|
282
675
|
left: 0;
|
|
283
676
|
height: 100%;
|
|
284
677
|
width: ${(props) => props.indeterminate ? "25%" : `${props.progress}%`};
|
|
285
|
-
background-color: ${(props) =>
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
return "#6B7280";
|
|
289
|
-
// Gray
|
|
290
|
-
case "running":
|
|
291
|
-
return "#3B82F6";
|
|
292
|
-
// Blue
|
|
293
|
-
case "completed":
|
|
294
|
-
return "#10B981";
|
|
295
|
-
// Green
|
|
296
|
-
case "failed":
|
|
297
|
-
return "#EF4444";
|
|
298
|
-
// Red
|
|
299
|
-
case "timeout":
|
|
300
|
-
return "#F59E0B";
|
|
301
|
-
}
|
|
302
|
-
}};
|
|
303
|
-
border-radius: 9999px;
|
|
304
|
-
transition: ${(props) => props.animated && !props.indeterminate ? "width 0.3s ease-out" : "none"};
|
|
678
|
+
background-color: ${(props) => statusColors[props.status]};
|
|
679
|
+
border-radius: ${tokens.borderRadius.full};
|
|
680
|
+
transition: ${(props) => props.animated && !props.indeterminate ? `width ${tokens.transitions.normal}` : "none"};
|
|
305
681
|
animation: ${(props) => props.indeterminate ? indeterminate : "none"} 1.5s ease-in-out infinite;
|
|
306
682
|
`;
|
|
307
|
-
var CircularContainer =
|
|
683
|
+
var CircularContainer = styled2.div`
|
|
308
684
|
display: flex;
|
|
309
685
|
align-items: center;
|
|
310
686
|
justify-content: center;
|
|
311
687
|
`;
|
|
312
|
-
var CircularSvg =
|
|
688
|
+
var CircularSvg = styled2.svg`
|
|
313
689
|
width: ${(props) => {
|
|
314
690
|
switch (props.size) {
|
|
315
691
|
case "sm":
|
|
316
|
-
return
|
|
692
|
+
return tokens.spacing.xl;
|
|
317
693
|
case "lg":
|
|
318
694
|
return "80px";
|
|
319
695
|
case "md":
|
|
@@ -324,7 +700,7 @@ var CircularSvg = styled4.svg`
|
|
|
324
700
|
height: ${(props) => {
|
|
325
701
|
switch (props.size) {
|
|
326
702
|
case "sm":
|
|
327
|
-
return
|
|
703
|
+
return tokens.spacing.xl;
|
|
328
704
|
case "lg":
|
|
329
705
|
return "80px";
|
|
330
706
|
case "md":
|
|
@@ -345,27 +721,14 @@ var getCircularSize = (size) => {
|
|
|
345
721
|
return { radius: 26, strokeWidth: 4 };
|
|
346
722
|
}
|
|
347
723
|
};
|
|
348
|
-
var CircularTrack =
|
|
349
|
-
fill: none;
|
|
350
|
-
stroke:
|
|
351
|
-
stroke-width: ${(props) => getCircularSize(props.size).strokeWidth};
|
|
352
|
-
`;
|
|
353
|
-
var CircularFill =
|
|
354
|
-
fill: none;
|
|
355
|
-
stroke: ${(props) =>
|
|
356
|
-
switch (props.status) {
|
|
357
|
-
case "pending":
|
|
358
|
-
return "#6B7280";
|
|
359
|
-
case "running":
|
|
360
|
-
return "#3B82F6";
|
|
361
|
-
case "completed":
|
|
362
|
-
return "#10B981";
|
|
363
|
-
case "failed":
|
|
364
|
-
return "#EF4444";
|
|
365
|
-
case "timeout":
|
|
366
|
-
return "#F59E0B";
|
|
367
|
-
}
|
|
368
|
-
}};
|
|
724
|
+
var CircularTrack = styled2.circle`
|
|
725
|
+
fill: none;
|
|
726
|
+
stroke: ${tokens.colors.border.default};
|
|
727
|
+
stroke-width: ${(props) => getCircularSize(props.size).strokeWidth};
|
|
728
|
+
`;
|
|
729
|
+
var CircularFill = styled2.circle`
|
|
730
|
+
fill: none;
|
|
731
|
+
stroke: ${(props) => statusColors[props.status]};
|
|
369
732
|
stroke-width: ${(props) => getCircularSize(props.size).strokeWidth};
|
|
370
733
|
stroke-dasharray: ${(props) => {
|
|
371
734
|
const { radius } = getCircularSize(props.size);
|
|
@@ -378,23 +741,23 @@ var CircularFill = styled4.circle`
|
|
|
378
741
|
return props.indeterminate ? 0 : circumference * (1 - props.progress / 100);
|
|
379
742
|
}};
|
|
380
743
|
stroke-linecap: round;
|
|
381
|
-
transition: ${(props) => props.animated && !props.indeterminate ?
|
|
744
|
+
transition: ${(props) => props.animated && !props.indeterminate ? `stroke-dashoffset ${tokens.transitions.normal}` : "none"};
|
|
382
745
|
animation: ${(props) => props.indeterminate ? rotate : "none"} 1.5s linear infinite;
|
|
383
746
|
`;
|
|
384
|
-
var CircularPercentage =
|
|
385
|
-
fill:
|
|
747
|
+
var CircularPercentage = styled2.text`
|
|
748
|
+
fill: ${tokens.colors.text.primary};
|
|
386
749
|
font-size: ${(props) => {
|
|
387
750
|
switch (props.size) {
|
|
388
751
|
case "sm":
|
|
389
|
-
return
|
|
752
|
+
return tokens.typography.fontSize.xs;
|
|
390
753
|
case "lg":
|
|
391
|
-
return
|
|
754
|
+
return tokens.typography.fontSize.base;
|
|
392
755
|
case "md":
|
|
393
756
|
default:
|
|
394
|
-
return
|
|
757
|
+
return tokens.typography.fontSize.xs;
|
|
395
758
|
}
|
|
396
759
|
}};
|
|
397
|
-
font-weight:
|
|
760
|
+
font-weight: ${tokens.typography.fontWeight.semibold};
|
|
398
761
|
text-anchor: middle;
|
|
399
762
|
dominant-baseline: middle;
|
|
400
763
|
transform: rotate(90deg);
|
|
@@ -482,60 +845,59 @@ var WorkflowProgressBar = ({
|
|
|
482
845
|
] });
|
|
483
846
|
};
|
|
484
847
|
WorkflowProgressBar.displayName = "WorkflowProgressBar";
|
|
485
|
-
var Panel =
|
|
848
|
+
var Panel = styled2.div`
|
|
486
849
|
display: flex;
|
|
487
850
|
flex-direction: column;
|
|
488
|
-
background-color:
|
|
489
|
-
border: 1px solid
|
|
490
|
-
border-radius:
|
|
851
|
+
background-color: ${tokens.colors.surface.overlay};
|
|
852
|
+
border: 1px solid ${tokens.colors.border.default};
|
|
853
|
+
border-radius: ${tokens.borderRadius.md};
|
|
491
854
|
overflow: hidden;
|
|
492
|
-
font-family:
|
|
493
|
-
'Cantarell', 'Fira Sans', 'Droid Sans', 'Helvetica Neue', sans-serif;
|
|
855
|
+
font-family: ${tokens.typography.fontFamily.primary};
|
|
494
856
|
`;
|
|
495
|
-
var
|
|
857
|
+
var Header2 = styled2.div`
|
|
496
858
|
display: flex;
|
|
497
859
|
justify-content: space-between;
|
|
498
860
|
align-items: center;
|
|
499
|
-
padding:
|
|
500
|
-
background-color:
|
|
501
|
-
border-bottom: 1px solid
|
|
861
|
+
padding: ${tokens.spacing.sm} ${tokens.spacing.md};
|
|
862
|
+
background-color: ${tokens.colors.surface.subtle};
|
|
863
|
+
border-bottom: 1px solid ${tokens.colors.border.default};
|
|
502
864
|
cursor: ${(props) => props.collapsible ? "pointer" : "default"};
|
|
503
865
|
user-select: none;
|
|
504
866
|
|
|
505
867
|
&:hover {
|
|
506
|
-
background-color: ${(props) => props.collapsible ?
|
|
868
|
+
background-color: ${(props) => props.collapsible ? tokens.colors.surface.overlay : tokens.colors.surface.subtle};
|
|
507
869
|
}
|
|
508
870
|
`;
|
|
509
|
-
var
|
|
510
|
-
font-size:
|
|
511
|
-
font-weight:
|
|
512
|
-
color:
|
|
871
|
+
var Title2 = styled2.div`
|
|
872
|
+
font-size: ${tokens.typography.fontSize.sm};
|
|
873
|
+
font-weight: ${tokens.typography.fontWeight.medium};
|
|
874
|
+
color: ${tokens.colors.text.primary};
|
|
513
875
|
display: flex;
|
|
514
876
|
align-items: center;
|
|
515
|
-
gap:
|
|
877
|
+
gap: ${tokens.spacing.sm};
|
|
516
878
|
`;
|
|
517
|
-
var
|
|
879
|
+
var Actions2 = styled2.div`
|
|
518
880
|
display: flex;
|
|
519
|
-
gap:
|
|
881
|
+
gap: ${tokens.spacing.sm};
|
|
520
882
|
`;
|
|
521
|
-
var IconButton =
|
|
883
|
+
var IconButton = styled2.button`
|
|
522
884
|
display: flex;
|
|
523
885
|
align-items: center;
|
|
524
886
|
justify-content: center;
|
|
525
887
|
width: 28px;
|
|
526
888
|
height: 28px;
|
|
527
889
|
padding: 0;
|
|
528
|
-
background:
|
|
529
|
-
border: 1px solid
|
|
530
|
-
border-radius:
|
|
531
|
-
color:
|
|
890
|
+
background: ${tokens.colors.surface.overlay};
|
|
891
|
+
border: 1px solid ${tokens.colors.border.default};
|
|
892
|
+
border-radius: ${tokens.borderRadius.sm};
|
|
893
|
+
color: ${tokens.colors.text.secondary};
|
|
532
894
|
cursor: pointer;
|
|
533
|
-
transition: all
|
|
895
|
+
transition: all ${tokens.transitions.fast};
|
|
534
896
|
|
|
535
897
|
&:hover {
|
|
536
|
-
background:
|
|
537
|
-
border-color:
|
|
538
|
-
color:
|
|
898
|
+
background: ${tokens.colors.surface.overlayHover};
|
|
899
|
+
border-color: ${tokens.colors.border.hover};
|
|
900
|
+
color: ${tokens.colors.text.primary};
|
|
539
901
|
}
|
|
540
902
|
|
|
541
903
|
&:active {
|
|
@@ -547,27 +909,27 @@ var IconButton = styled4.button`
|
|
|
547
909
|
height: 16px;
|
|
548
910
|
}
|
|
549
911
|
`;
|
|
550
|
-
var CollapseIcon =
|
|
912
|
+
var CollapseIcon = styled2.div`
|
|
551
913
|
display: flex;
|
|
552
914
|
align-items: center;
|
|
553
915
|
justify-content: center;
|
|
554
|
-
transition: transform
|
|
916
|
+
transition: transform ${tokens.transitions.fast};
|
|
555
917
|
transform: ${(props) => props.expanded ? "rotate(180deg)" : "rotate(0deg)"};
|
|
556
|
-
color:
|
|
918
|
+
color: ${tokens.colors.text.secondary};
|
|
557
919
|
|
|
558
920
|
svg {
|
|
559
921
|
width: 16px;
|
|
560
922
|
height: 16px;
|
|
561
923
|
}
|
|
562
924
|
`;
|
|
563
|
-
var
|
|
564
|
-
padding:
|
|
925
|
+
var Content2 = styled2.div`
|
|
926
|
+
padding: ${tokens.spacing.md};
|
|
565
927
|
max-height: ${(props) => {
|
|
566
928
|
if (!props.expanded) return "0";
|
|
567
929
|
return props.maxHeight || "400px";
|
|
568
930
|
}};
|
|
569
931
|
overflow: ${(props) => props.expanded ? "auto" : "hidden"};
|
|
570
|
-
transition: max-height
|
|
932
|
+
transition: max-height ${tokens.transitions.normal};
|
|
571
933
|
|
|
572
934
|
/* Custom scrollbar */
|
|
573
935
|
&::-webkit-scrollbar {
|
|
@@ -575,66 +937,66 @@ var Content = styled4.div`
|
|
|
575
937
|
}
|
|
576
938
|
|
|
577
939
|
&::-webkit-scrollbar-track {
|
|
578
|
-
background:
|
|
579
|
-
border-radius:
|
|
940
|
+
background: ${tokens.colors.scrollbar.track};
|
|
941
|
+
border-radius: ${tokens.borderRadius.sm};
|
|
580
942
|
}
|
|
581
943
|
|
|
582
944
|
&::-webkit-scrollbar-thumb {
|
|
583
|
-
background:
|
|
584
|
-
border-radius:
|
|
945
|
+
background: ${tokens.colors.scrollbar.thumb};
|
|
946
|
+
border-radius: ${tokens.borderRadius.sm};
|
|
585
947
|
}
|
|
586
948
|
|
|
587
949
|
&::-webkit-scrollbar-thumb:hover {
|
|
588
|
-
background:
|
|
950
|
+
background: ${tokens.colors.scrollbar.thumbHover};
|
|
589
951
|
}
|
|
590
952
|
`;
|
|
591
|
-
var JsonView =
|
|
953
|
+
var JsonView = styled2.pre`
|
|
592
954
|
margin: 0;
|
|
593
|
-
font-family:
|
|
594
|
-
font-size:
|
|
595
|
-
line-height:
|
|
596
|
-
color:
|
|
955
|
+
font-family: ${tokens.typography.fontFamily.monospace};
|
|
956
|
+
font-size: ${tokens.typography.fontSize.sm};
|
|
957
|
+
line-height: ${tokens.typography.lineHeight.normal};
|
|
958
|
+
color: ${tokens.colors.text.secondary};
|
|
597
959
|
white-space: pre-wrap;
|
|
598
960
|
word-break: break-word;
|
|
599
961
|
`;
|
|
600
|
-
var FormattedView =
|
|
601
|
-
font-size:
|
|
602
|
-
line-height:
|
|
603
|
-
color:
|
|
962
|
+
var FormattedView = styled2.div`
|
|
963
|
+
font-size: ${tokens.typography.fontSize.sm};
|
|
964
|
+
line-height: ${tokens.typography.lineHeight.normal};
|
|
965
|
+
color: ${tokens.colors.text.secondary};
|
|
604
966
|
`;
|
|
605
|
-
var TableView =
|
|
967
|
+
var TableView = styled2.table`
|
|
606
968
|
width: 100%;
|
|
607
969
|
border-collapse: collapse;
|
|
608
|
-
font-size:
|
|
970
|
+
font-size: ${tokens.typography.fontSize.sm};
|
|
609
971
|
|
|
610
972
|
th {
|
|
611
973
|
text-align: left;
|
|
612
|
-
padding:
|
|
613
|
-
background-color:
|
|
614
|
-
border-bottom: 1px solid
|
|
615
|
-
font-weight:
|
|
616
|
-
color:
|
|
974
|
+
padding: ${tokens.spacing.sm} ${tokens.spacing.sm};
|
|
975
|
+
background-color: ${tokens.colors.surface.overlay};
|
|
976
|
+
border-bottom: 1px solid ${tokens.colors.border.default};
|
|
977
|
+
font-weight: ${tokens.typography.fontWeight.medium};
|
|
978
|
+
color: ${tokens.colors.text.primary};
|
|
617
979
|
}
|
|
618
980
|
|
|
619
981
|
td {
|
|
620
|
-
padding:
|
|
621
|
-
border-bottom: 1px solid
|
|
622
|
-
color:
|
|
982
|
+
padding: ${tokens.spacing.sm} ${tokens.spacing.sm};
|
|
983
|
+
border-bottom: 1px solid ${tokens.colors.border.subtle};
|
|
984
|
+
color: ${tokens.colors.text.secondary};
|
|
623
985
|
}
|
|
624
986
|
|
|
625
987
|
tr:last-child td {
|
|
626
988
|
border-bottom: none;
|
|
627
989
|
}
|
|
628
990
|
`;
|
|
629
|
-
var EmptyState =
|
|
630
|
-
padding:
|
|
991
|
+
var EmptyState = styled2.div`
|
|
992
|
+
padding: ${tokens.spacing.xl};
|
|
631
993
|
text-align: center;
|
|
632
|
-
color:
|
|
633
|
-
font-size:
|
|
994
|
+
color: ${tokens.colors.text.tertiary};
|
|
995
|
+
font-size: ${tokens.typography.fontSize.sm};
|
|
634
996
|
`;
|
|
635
997
|
var DownloadIcon = () => /* @__PURE__ */ jsx("svg", { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", fill: "currentColor", children: /* @__PURE__ */ jsx("path", { d: "M19 9h-4V3H9v6H5l7 7 7-7zM5 18v2h14v-2H5z" }) });
|
|
636
998
|
var CopyIcon = () => /* @__PURE__ */ jsx("svg", { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", fill: "currentColor", children: /* @__PURE__ */ jsx("path", { d: "M16 1H4c-1.1 0-2 .9-2 2v14h2V3h12V1zm3 4H8c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h11c1.1 0 2-.9 2-2V7c0-1.1-.9-2-2-2zm0 16H8V7h11v14z" }) });
|
|
637
|
-
var
|
|
999
|
+
var ChevronIcon2 = () => /* @__PURE__ */ jsx("svg", { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", fill: "currentColor", children: /* @__PURE__ */ jsx("path", { d: "M7.41 8.59L12 13.17l4.59-4.58L18 10l-6 6-6-6 1.41-1.41z" }) });
|
|
638
1000
|
var WorkflowResultPanel = ({
|
|
639
1001
|
outputData,
|
|
640
1002
|
variant = "json",
|
|
@@ -685,302 +1047,234 @@ var WorkflowResultPanel = ({
|
|
|
685
1047
|
}
|
|
686
1048
|
};
|
|
687
1049
|
return /* @__PURE__ */ jsxs(Panel, { collapsible, expanded, className, children: [
|
|
688
|
-
/* @__PURE__ */ jsxs(
|
|
689
|
-
/* @__PURE__ */ jsxs(
|
|
1050
|
+
/* @__PURE__ */ jsxs(Header2, { collapsible, onClick: handleToggle, children: [
|
|
1051
|
+
/* @__PURE__ */ jsxs(Title2, { children: [
|
|
690
1052
|
title,
|
|
691
|
-
collapsible && /* @__PURE__ */ jsx(CollapseIcon, { expanded, children: /* @__PURE__ */ jsx(
|
|
1053
|
+
collapsible && /* @__PURE__ */ jsx(CollapseIcon, { expanded, children: /* @__PURE__ */ jsx(ChevronIcon2, {}) })
|
|
692
1054
|
] }),
|
|
693
|
-
/* @__PURE__ */ jsxs(
|
|
1055
|
+
/* @__PURE__ */ jsxs(Actions2, { onClick: (e) => e.stopPropagation(), children: [
|
|
694
1056
|
onCopy && /* @__PURE__ */ jsx(IconButton, { onClick: onCopy, title: "Copy to clipboard", "aria-label": "Copy to clipboard", children: /* @__PURE__ */ jsx(CopyIcon, {}) }),
|
|
695
1057
|
onDownload && /* @__PURE__ */ jsx(IconButton, { onClick: onDownload, title: "Download", "aria-label": "Download results", children: /* @__PURE__ */ jsx(DownloadIcon, {}) })
|
|
696
1058
|
] })
|
|
697
1059
|
] }),
|
|
698
|
-
/* @__PURE__ */ jsx(
|
|
1060
|
+
/* @__PURE__ */ jsx(Content2, { maxHeight, expanded, children: renderContent() })
|
|
699
1061
|
] });
|
|
700
1062
|
};
|
|
701
1063
|
WorkflowResultPanel.displayName = "WorkflowResultPanel";
|
|
702
|
-
var
|
|
703
|
-
|
|
704
|
-
|
|
705
|
-
background-color: ${(props) => {
|
|
706
|
-
const alpha = props.variant === "modal" ? "0.15" : props.variant === "banner" ? "0.1" : "0.05";
|
|
707
|
-
switch (props.severity) {
|
|
708
|
-
case "error":
|
|
709
|
-
return `rgba(239, 68, 68, ${alpha})`;
|
|
710
|
-
case "warning":
|
|
711
|
-
return `rgba(245, 158, 11, ${alpha})`;
|
|
712
|
-
case "info":
|
|
713
|
-
return `rgba(59, 130, 246, ${alpha})`;
|
|
1064
|
+
var spin = keyframes`
|
|
1065
|
+
from {
|
|
1066
|
+
transform: rotate(0deg);
|
|
714
1067
|
}
|
|
715
|
-
|
|
716
|
-
|
|
717
|
-
${(props) => {
|
|
718
|
-
const alpha = props.variant === "modal" ? "0.4" : "0.3";
|
|
719
|
-
switch (props.severity) {
|
|
720
|
-
case "error":
|
|
721
|
-
return `rgba(239, 68, 68, ${alpha})`;
|
|
722
|
-
case "warning":
|
|
723
|
-
return `rgba(245, 158, 11, ${alpha})`;
|
|
724
|
-
case "info":
|
|
725
|
-
return `rgba(59, 130, 246, ${alpha})`;
|
|
1068
|
+
to {
|
|
1069
|
+
transform: rotate(360deg);
|
|
726
1070
|
}
|
|
727
|
-
}};
|
|
728
|
-
border-radius: ${(props) => props.variant === "banner" ? "0" : "8px"};
|
|
729
|
-
padding: ${(props) => props.variant === "modal" ? "20px" : "16px"};
|
|
730
|
-
margin: ${(props) => props.variant === "banner" ? "0" : "8px 0"};
|
|
731
|
-
width: ${(props) => props.variant === "modal" ? "auto" : "100%"};
|
|
732
|
-
max-width: ${(props) => props.variant === "inline" ? "600px" : "100%"};
|
|
733
|
-
font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen', 'Ubuntu',
|
|
734
|
-
'Cantarell', 'Fira Sans', 'Droid Sans', 'Helvetica Neue', sans-serif;
|
|
735
|
-
`;
|
|
736
|
-
var ModalOverlay = styled4.div`
|
|
737
|
-
position: fixed;
|
|
738
|
-
top: 0;
|
|
739
|
-
left: 0;
|
|
740
|
-
right: 0;
|
|
741
|
-
bottom: 0;
|
|
742
|
-
background-color: rgba(0, 0, 0, 0.6);
|
|
743
|
-
display: ${(props) => props.isOpen ? "flex" : "none"};
|
|
744
|
-
align-items: center;
|
|
745
|
-
justify-content: center;
|
|
746
|
-
z-index: 1000;
|
|
747
|
-
padding: 20px;
|
|
748
|
-
`;
|
|
749
|
-
var ModalContent = styled4.div`
|
|
750
|
-
background-color: #1A1A1A;
|
|
751
|
-
border-radius: 12px;
|
|
752
|
-
max-width: 500px;
|
|
753
|
-
width: 100%;
|
|
754
|
-
box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.3), 0 10px 10px -5px rgba(0, 0, 0, 0.2);
|
|
755
|
-
`;
|
|
756
|
-
var Header2 = styled4.div`
|
|
757
|
-
display: flex;
|
|
758
|
-
align-items: flex-start;
|
|
759
|
-
gap: 12px;
|
|
760
1071
|
`;
|
|
761
|
-
var
|
|
762
|
-
|
|
763
|
-
|
|
764
|
-
height: 24px;
|
|
765
|
-
color: ${(props) => {
|
|
766
|
-
switch (props.severity) {
|
|
767
|
-
case "error":
|
|
768
|
-
return "#EF4444";
|
|
769
|
-
case "warning":
|
|
770
|
-
return "#F59E0B";
|
|
771
|
-
case "info":
|
|
772
|
-
return "#3B82F6";
|
|
1072
|
+
var pulse = keyframes`
|
|
1073
|
+
0%, 100% {
|
|
1074
|
+
opacity: 1;
|
|
773
1075
|
}
|
|
774
|
-
|
|
775
|
-
|
|
776
|
-
var Content2 = styled4.div`
|
|
777
|
-
flex: 1;
|
|
778
|
-
display: flex;
|
|
779
|
-
flex-direction: column;
|
|
780
|
-
gap: 8px;
|
|
781
|
-
`;
|
|
782
|
-
var Title2 = styled4.div`
|
|
783
|
-
font-size: 15px;
|
|
784
|
-
font-weight: 600;
|
|
785
|
-
color: #FFFFFF;
|
|
786
|
-
line-height: 1.4;
|
|
787
|
-
`;
|
|
788
|
-
var ErrorMessage = styled4.div`
|
|
789
|
-
font-size: 14px;
|
|
790
|
-
line-height: 1.5;
|
|
791
|
-
color: #E5E7EB;
|
|
792
|
-
`;
|
|
793
|
-
var ErrorCode = styled4.div`
|
|
794
|
-
font-size: 12px;
|
|
795
|
-
color: #9CA3AF;
|
|
796
|
-
font-family: 'SF Mono', Monaco, 'Cascadia Code', 'Roboto Mono', Consolas, 'Courier New', monospace;
|
|
797
|
-
margin-top: 4px;
|
|
798
|
-
`;
|
|
799
|
-
var Timestamp = styled4.div`
|
|
800
|
-
font-size: 12px;
|
|
801
|
-
color: #6B7280;
|
|
802
|
-
margin-top: 4px;
|
|
803
|
-
`;
|
|
804
|
-
var Details = styled4.details`
|
|
805
|
-
margin-top: 12px;
|
|
806
|
-
cursor: pointer;
|
|
807
|
-
|
|
808
|
-
summary {
|
|
809
|
-
font-size: 13px;
|
|
810
|
-
font-weight: 500;
|
|
811
|
-
color: #9CA3AF;
|
|
812
|
-
user-select: none;
|
|
813
|
-
list-style: none;
|
|
814
|
-
display: flex;
|
|
815
|
-
align-items: center;
|
|
816
|
-
gap: 4px;
|
|
817
|
-
|
|
818
|
-
&:hover {
|
|
819
|
-
color: #FFFFFF;
|
|
820
|
-
}
|
|
821
|
-
|
|
822
|
-
&::-webkit-details-marker {
|
|
823
|
-
display: none;
|
|
824
|
-
}
|
|
1076
|
+
50% {
|
|
1077
|
+
opacity: 0.5;
|
|
825
1078
|
}
|
|
826
1079
|
`;
|
|
827
|
-
var
|
|
828
|
-
|
|
829
|
-
|
|
830
|
-
|
|
831
|
-
|
|
832
|
-
|
|
833
|
-
|
|
834
|
-
|
|
835
|
-
background-color: rgba(0, 0, 0, 0.3);
|
|
836
|
-
border-radius: 4px;
|
|
837
|
-
font-family: 'SF Mono', Monaco, 'Cascadia Code', 'Roboto Mono', Consolas, 'Courier New', monospace;
|
|
838
|
-
font-size: 11px;
|
|
839
|
-
line-height: 1.5;
|
|
840
|
-
color: #D1D5DB;
|
|
841
|
-
white-space: pre-wrap;
|
|
842
|
-
word-break: break-word;
|
|
843
|
-
overflow-x: auto;
|
|
844
|
-
`;
|
|
845
|
-
var Actions2 = styled4.div`
|
|
846
|
-
display: flex;
|
|
847
|
-
gap: 8px;
|
|
848
|
-
margin-top: 16px;
|
|
849
|
-
`;
|
|
850
|
-
var Button = styled4.button`
|
|
1080
|
+
var statusColors2 = {
|
|
1081
|
+
pending: tokens.colors.status.pending,
|
|
1082
|
+
running: tokens.colors.status.running,
|
|
1083
|
+
completed: tokens.colors.status.completed,
|
|
1084
|
+
failed: tokens.colors.status.failed,
|
|
1085
|
+
timeout: tokens.colors.status.timeout
|
|
1086
|
+
};
|
|
1087
|
+
var BadgeContainer = styled2.div`
|
|
851
1088
|
display: inline-flex;
|
|
852
1089
|
align-items: center;
|
|
853
|
-
gap:
|
|
854
|
-
|
|
855
|
-
|
|
856
|
-
|
|
857
|
-
|
|
858
|
-
|
|
859
|
-
|
|
860
|
-
|
|
861
|
-
|
|
862
|
-
cursor: pointer;
|
|
863
|
-
transition: all 0.15s ease-in-out;
|
|
864
|
-
|
|
865
|
-
&:hover {
|
|
866
|
-
background: ${(props) => props.variant === "primary" ? "#DC2626" : "rgba(255, 255, 255, 0.1)"};
|
|
867
|
-
border-color: ${(props) => props.variant === "primary" ? "#DC2626" : "rgba(255, 255, 255, 0.2)"};
|
|
1090
|
+
gap: ${(props) => {
|
|
1091
|
+
switch (props.$size) {
|
|
1092
|
+
case "sm":
|
|
1093
|
+
return tokens.spacing.xs;
|
|
1094
|
+
case "lg":
|
|
1095
|
+
return tokens.spacing.sm;
|
|
1096
|
+
case "md":
|
|
1097
|
+
default:
|
|
1098
|
+
return "6px";
|
|
868
1099
|
}
|
|
869
|
-
|
|
870
|
-
|
|
871
|
-
|
|
1100
|
+
}};
|
|
1101
|
+
padding: ${(props) => {
|
|
1102
|
+
switch (props.$size) {
|
|
1103
|
+
case "sm":
|
|
1104
|
+
return `${tokens.spacing.xs} ${tokens.spacing.sm}`;
|
|
1105
|
+
case "lg":
|
|
1106
|
+
return `${tokens.spacing.sm} ${tokens.spacing.md}`;
|
|
1107
|
+
case "md":
|
|
1108
|
+
default:
|
|
1109
|
+
return `6px ${tokens.spacing.md}`;
|
|
872
1110
|
}
|
|
873
|
-
|
|
874
|
-
|
|
875
|
-
|
|
876
|
-
|
|
1111
|
+
}};
|
|
1112
|
+
background-color: ${(props) => `${statusColors2[props.$status]}1A`};
|
|
1113
|
+
border: 1px solid ${(props) => `${statusColors2[props.$status]}4D`};
|
|
1114
|
+
border-radius: ${(props) => {
|
|
1115
|
+
switch (props.$size) {
|
|
1116
|
+
case "sm":
|
|
1117
|
+
return tokens.borderRadius.sm;
|
|
1118
|
+
case "lg":
|
|
1119
|
+
return tokens.borderRadius.md;
|
|
1120
|
+
case "md":
|
|
1121
|
+
default:
|
|
1122
|
+
return tokens.borderRadius.md;
|
|
1123
|
+
}
|
|
1124
|
+
}};
|
|
1125
|
+
font-family: ${tokens.typography.fontFamily.primary};
|
|
1126
|
+
font-size: ${(props) => {
|
|
1127
|
+
switch (props.$size) {
|
|
1128
|
+
case "sm":
|
|
1129
|
+
return "11px";
|
|
1130
|
+
case "lg":
|
|
1131
|
+
return "15px";
|
|
1132
|
+
case "md":
|
|
1133
|
+
default:
|
|
1134
|
+
return "13px";
|
|
877
1135
|
}
|
|
1136
|
+
}};
|
|
1137
|
+
font-weight: ${tokens.typography.fontWeight.medium};
|
|
1138
|
+
color: ${(props) => statusColors2[props.$status]};
|
|
1139
|
+
line-height: 1.4;
|
|
878
1140
|
`;
|
|
879
|
-
var
|
|
880
|
-
position: absolute;
|
|
881
|
-
top: 12px;
|
|
882
|
-
right: 12px;
|
|
883
|
-
width: 32px;
|
|
884
|
-
height: 32px;
|
|
885
|
-
padding: 0;
|
|
1141
|
+
var IconContainer2 = styled2.div`
|
|
886
1142
|
display: flex;
|
|
887
1143
|
align-items: center;
|
|
888
1144
|
justify-content: center;
|
|
889
|
-
|
|
890
|
-
|
|
891
|
-
|
|
892
|
-
|
|
893
|
-
|
|
894
|
-
|
|
895
|
-
|
|
896
|
-
&:hover {
|
|
897
|
-
background: rgba(255, 255, 255, 0.1);
|
|
898
|
-
color: #FFFFFF;
|
|
1145
|
+
width: 16px;
|
|
1146
|
+
height: 16px;
|
|
1147
|
+
animation: ${(props) => {
|
|
1148
|
+
if (props.$animated) {
|
|
1149
|
+
if (props.$status === "running") return spin;
|
|
1150
|
+
if (props.$status === "pending") return pulse;
|
|
899
1151
|
}
|
|
900
|
-
|
|
901
|
-
|
|
902
|
-
|
|
1152
|
+
return "none";
|
|
1153
|
+
}}
|
|
1154
|
+
${(props) => props.$status === "running" ? "1s" : "2s"} linear infinite;
|
|
1155
|
+
`;
|
|
1156
|
+
var PendingIcon = () => /* @__PURE__ */ jsx(
|
|
1157
|
+
"svg",
|
|
1158
|
+
{
|
|
1159
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
1160
|
+
viewBox: "0 0 24 24",
|
|
1161
|
+
fill: "currentColor",
|
|
1162
|
+
width: "16",
|
|
1163
|
+
height: "16",
|
|
1164
|
+
children: /* @__PURE__ */ jsx("path", { d: "M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm0 18c-4.42 0-8-3.58-8-8s3.58-8 8-8 8 3.58 8 8-3.58 8-8 8zm.5-13H11v6l5.25 3.15.75-1.23-4.5-2.67z" })
|
|
903
1165
|
}
|
|
904
|
-
|
|
905
|
-
|
|
906
|
-
|
|
907
|
-
|
|
1166
|
+
);
|
|
1167
|
+
var RunningIcon = () => /* @__PURE__ */ jsxs(
|
|
1168
|
+
"svg",
|
|
1169
|
+
{
|
|
1170
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
1171
|
+
viewBox: "0 0 24 24",
|
|
1172
|
+
fill: "currentColor",
|
|
1173
|
+
width: "16",
|
|
1174
|
+
height: "16",
|
|
1175
|
+
children: [
|
|
1176
|
+
/* @__PURE__ */ jsx(
|
|
1177
|
+
"path",
|
|
1178
|
+
{
|
|
1179
|
+
d: "M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm-2 15l-5-5 1.41-1.41L10 14.17l7.59-7.59L19 8l-9 9z",
|
|
1180
|
+
opacity: "0.3"
|
|
1181
|
+
}
|
|
1182
|
+
),
|
|
1183
|
+
/* @__PURE__ */ jsx("path", { d: "M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm0 18c-4.42 0-8-3.58-8-8s3.58-8 8-8 8 3.58 8 8-3.58 8-8 8z" })
|
|
1184
|
+
]
|
|
1185
|
+
}
|
|
1186
|
+
);
|
|
1187
|
+
var CompletedIcon = () => /* @__PURE__ */ jsx(
|
|
1188
|
+
"svg",
|
|
1189
|
+
{
|
|
1190
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
1191
|
+
viewBox: "0 0 24 24",
|
|
1192
|
+
fill: "currentColor",
|
|
1193
|
+
width: "16",
|
|
1194
|
+
height: "16",
|
|
1195
|
+
children: /* @__PURE__ */ jsx("path", { d: "M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm-2 15l-5-5 1.41-1.41L10 14.17l7.59-7.59L19 8l-9 9z" })
|
|
1196
|
+
}
|
|
1197
|
+
);
|
|
1198
|
+
var FailedIcon = () => /* @__PURE__ */ jsx(
|
|
1199
|
+
"svg",
|
|
1200
|
+
{
|
|
1201
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
1202
|
+
viewBox: "0 0 24 24",
|
|
1203
|
+
fill: "currentColor",
|
|
1204
|
+
width: "16",
|
|
1205
|
+
height: "16",
|
|
1206
|
+
children: /* @__PURE__ */ jsx("path", { d: "M12 2C6.47 2 2 6.47 2 12s4.47 10 10 10 10-4.47 10-10S17.53 2 12 2zm5 13.59L15.59 17 12 13.41 8.41 17 7 15.59 10.59 12 7 8.41 8.41 7 12 10.59 15.59 7 17 8.41 13.41 12 17 15.59z" })
|
|
1207
|
+
}
|
|
1208
|
+
);
|
|
1209
|
+
var TimeoutIcon = () => /* @__PURE__ */ jsx(
|
|
1210
|
+
"svg",
|
|
1211
|
+
{
|
|
1212
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
1213
|
+
viewBox: "0 0 24 24",
|
|
1214
|
+
fill: "currentColor",
|
|
1215
|
+
width: "16",
|
|
1216
|
+
height: "16",
|
|
1217
|
+
children: /* @__PURE__ */ jsx("path", { d: "M1 21h22L12 2 1 21zm12-3h-2v-2h2v2zm0-4h-2v-4h2v4z" })
|
|
908
1218
|
}
|
|
1219
|
+
);
|
|
1220
|
+
var Label = styled2.span`
|
|
1221
|
+
white-space: nowrap;
|
|
909
1222
|
`;
|
|
910
|
-
var
|
|
911
|
-
|
|
912
|
-
|
|
913
|
-
|
|
914
|
-
|
|
915
|
-
|
|
916
|
-
|
|
917
|
-
|
|
918
|
-
|
|
919
|
-
|
|
920
|
-
|
|
921
|
-
|
|
922
|
-
|
|
923
|
-
|
|
924
|
-
|
|
925
|
-
|
|
926
|
-
|
|
1223
|
+
var getDefaultLabel = (status) => {
|
|
1224
|
+
switch (status) {
|
|
1225
|
+
case "pending":
|
|
1226
|
+
return "Pending";
|
|
1227
|
+
case "running":
|
|
1228
|
+
return "Running";
|
|
1229
|
+
case "completed":
|
|
1230
|
+
return "Completed";
|
|
1231
|
+
case "failed":
|
|
1232
|
+
return "Failed";
|
|
1233
|
+
case "timeout":
|
|
1234
|
+
return "Timeout";
|
|
1235
|
+
}
|
|
1236
|
+
};
|
|
1237
|
+
var getStatusIcon = (status) => {
|
|
1238
|
+
switch (status) {
|
|
1239
|
+
case "pending":
|
|
1240
|
+
return /* @__PURE__ */ jsx(PendingIcon, {});
|
|
1241
|
+
case "running":
|
|
1242
|
+
return /* @__PURE__ */ jsx(RunningIcon, {});
|
|
1243
|
+
case "completed":
|
|
1244
|
+
return /* @__PURE__ */ jsx(CompletedIcon, {});
|
|
1245
|
+
case "failed":
|
|
1246
|
+
return /* @__PURE__ */ jsx(FailedIcon, {});
|
|
1247
|
+
case "timeout":
|
|
1248
|
+
return /* @__PURE__ */ jsx(TimeoutIcon, {});
|
|
1249
|
+
}
|
|
1250
|
+
};
|
|
1251
|
+
var WorkflowStatusBadge = ({
|
|
1252
|
+
status,
|
|
1253
|
+
size = "md",
|
|
1254
|
+
showIcon = true,
|
|
1255
|
+
showLabel = true,
|
|
1256
|
+
animated = true,
|
|
1257
|
+
label,
|
|
927
1258
|
className
|
|
928
1259
|
}) => {
|
|
929
|
-
const
|
|
930
|
-
|
|
931
|
-
|
|
932
|
-
|
|
933
|
-
|
|
934
|
-
|
|
935
|
-
|
|
936
|
-
|
|
937
|
-
|
|
938
|
-
|
|
939
|
-
|
|
940
|
-
|
|
941
|
-
|
|
942
|
-
case "error":
|
|
943
|
-
return /* @__PURE__ */ jsx(ErrorIcon, {});
|
|
944
|
-
case "warning":
|
|
945
|
-
return /* @__PURE__ */ jsx(WarningIcon, {});
|
|
946
|
-
case "info":
|
|
947
|
-
return /* @__PURE__ */ jsx(InfoIcon, {});
|
|
1260
|
+
const displayLabel = label || getDefaultLabel(status);
|
|
1261
|
+
return /* @__PURE__ */ jsxs(
|
|
1262
|
+
BadgeContainer,
|
|
1263
|
+
{
|
|
1264
|
+
$status: status,
|
|
1265
|
+
$size: size,
|
|
1266
|
+
className,
|
|
1267
|
+
role: "status",
|
|
1268
|
+
"aria-label": displayLabel,
|
|
1269
|
+
children: [
|
|
1270
|
+
showIcon && /* @__PURE__ */ jsx(IconContainer2, { $animated: animated, $status: status, "aria-hidden": "true", children: getStatusIcon(status) }),
|
|
1271
|
+
showLabel && /* @__PURE__ */ jsx(Label, { children: displayLabel })
|
|
1272
|
+
]
|
|
948
1273
|
}
|
|
949
|
-
|
|
950
|
-
const alertContent = /* @__PURE__ */ jsx(AlertContainer, { variant, severity, className, role: "alert", children: /* @__PURE__ */ jsxs(Header2, { children: [
|
|
951
|
-
/* @__PURE__ */ jsx(IconContainer2, { severity, "aria-hidden": "true", children: getIcon() }),
|
|
952
|
-
/* @__PURE__ */ jsxs(Content2, { children: [
|
|
953
|
-
/* @__PURE__ */ jsx(Title2, { children: displayTitle }),
|
|
954
|
-
/* @__PURE__ */ jsx(ErrorMessage, { children: errorMessage }),
|
|
955
|
-
errorCode && /* @__PURE__ */ jsxs(ErrorCode, { children: [
|
|
956
|
-
"Error Code: ",
|
|
957
|
-
errorCode
|
|
958
|
-
] }),
|
|
959
|
-
timestamp && /* @__PURE__ */ jsx(Timestamp, { children: new Date(timestamp).toLocaleString() }),
|
|
960
|
-
showDetails && (stackTrace || typeof error === "object" && error.stack) && /* @__PURE__ */ jsxs(Details, { open: detailsOpen, onToggle: (e) => setDetailsOpen(e.target.open), children: [
|
|
961
|
-
/* @__PURE__ */ jsxs("summary", { children: [
|
|
962
|
-
/* @__PURE__ */ jsx(DetailsIcon, { open: detailsOpen, children: /* @__PURE__ */ jsx(ChevronIcon2, {}) }),
|
|
963
|
-
"Show Details"
|
|
964
|
-
] }),
|
|
965
|
-
/* @__PURE__ */ jsx(StackTrace, { children: stackTrace || (typeof error === "object" ? error.stack : "") })
|
|
966
|
-
] }),
|
|
967
|
-
(retryable || onDismiss) && /* @__PURE__ */ jsxs(Actions2, { children: [
|
|
968
|
-
retryable && onRetry && /* @__PURE__ */ jsx(Button, { variant: "primary", onClick: onRetry, children: "Retry" }),
|
|
969
|
-
onDismiss && /* @__PURE__ */ jsx(Button, { variant: "secondary", onClick: handleDismiss, children: "Dismiss" })
|
|
970
|
-
] })
|
|
971
|
-
] }),
|
|
972
|
-
variant !== "modal" && onDismiss && /* @__PURE__ */ jsx(CloseButton, { onClick: handleDismiss, "aria-label": "Dismiss alert", children: /* @__PURE__ */ jsx(CloseIcon, {}) })
|
|
973
|
-
] }) });
|
|
974
|
-
if (variant === "modal") {
|
|
975
|
-
return /* @__PURE__ */ jsx(ModalOverlay, { isOpen: isModalOpen, onClick: handleDismiss, children: /* @__PURE__ */ jsxs(ModalContent, { onClick: (e) => e.stopPropagation(), children: [
|
|
976
|
-
alertContent,
|
|
977
|
-
/* @__PURE__ */ jsx(CloseButton, { onClick: handleDismiss, "aria-label": "Close modal", children: /* @__PURE__ */ jsx(CloseIcon, {}) })
|
|
978
|
-
] }) });
|
|
979
|
-
}
|
|
980
|
-
return alertContent;
|
|
1274
|
+
);
|
|
981
1275
|
};
|
|
982
|
-
|
|
1276
|
+
WorkflowStatusBadge.displayName = "WorkflowStatusBadge";
|
|
983
1277
|
|
|
984
|
-
export { WorkflowErrorAlert, WorkflowProgressBar, WorkflowResultPanel, WorkflowStatusBadge };
|
|
1278
|
+
export { WorkflowCard, WorkflowErrorAlert, WorkflowProgressBar, WorkflowResultPanel, WorkflowStatusBadge };
|
|
985
1279
|
//# sourceMappingURL=index.js.map
|
|
986
1280
|
//# sourceMappingURL=index.js.map
|