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