@agentiffai/design 0.1.1 → 0.1.3

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 (49) hide show
  1. package/dist/Window-CukhSS8T.d.cts +431 -0
  2. package/dist/Window-CukhSS8T.d.ts +431 -0
  3. package/dist/copilotkit/index.cjs +2141 -112
  4. package/dist/copilotkit/index.cjs.map +1 -1
  5. package/dist/copilotkit/index.d.cts +159 -0
  6. package/dist/copilotkit/index.d.ts +159 -0
  7. package/dist/copilotkit/index.js +2100 -24
  8. package/dist/copilotkit/index.js.map +1 -1
  9. package/dist/icons/index.cjs +1264 -44
  10. package/dist/icons/index.cjs.map +1 -1
  11. package/dist/icons/index.d.cts +375 -0
  12. package/dist/icons/index.d.ts +375 -0
  13. package/dist/icons/index.js +1251 -1
  14. package/dist/icons/index.js.map +1 -1
  15. package/dist/index.cjs +5879 -430
  16. package/dist/index.cjs.map +1 -1
  17. package/dist/index.d.cts +185 -0
  18. package/dist/index.d.ts +185 -0
  19. package/dist/index.js +5837 -259
  20. package/dist/index.js.map +1 -1
  21. package/dist/layout/index.cjs +2215 -44
  22. package/dist/layout/index.cjs.map +1 -1
  23. package/dist/layout/index.d.cts +218 -0
  24. package/dist/layout/index.d.ts +218 -0
  25. package/dist/layout/index.js +2202 -1
  26. package/dist/layout/index.js.map +1 -1
  27. package/dist/theme/index.cjs +65 -17
  28. package/dist/theme/index.cjs.map +1 -1
  29. package/dist/theme/index.d.cts +95 -0
  30. package/dist/theme/index.d.ts +95 -0
  31. package/dist/theme/index.js +65 -1
  32. package/dist/theme/index.js.map +1 -1
  33. package/package.json +1 -1
  34. package/dist/chunk-6NGVSBJZ.js +0 -2204
  35. package/dist/chunk-6NGVSBJZ.js.map +0 -1
  36. package/dist/chunk-CVHHTWDQ.cjs +0 -72
  37. package/dist/chunk-CVHHTWDQ.cjs.map +0 -1
  38. package/dist/chunk-H4VHCHCP.cjs +0 -1268
  39. package/dist/chunk-H4VHCHCP.cjs.map +0 -1
  40. package/dist/chunk-JQ6Q7MDQ.js +0 -67
  41. package/dist/chunk-JQ6Q7MDQ.js.map +0 -1
  42. package/dist/chunk-PAOXD7DF.js +0 -1253
  43. package/dist/chunk-PAOXD7DF.js.map +0 -1
  44. package/dist/chunk-TI5EB3ER.cjs +0 -2116
  45. package/dist/chunk-TI5EB3ER.cjs.map +0 -1
  46. package/dist/chunk-ULL2LDN3.cjs +0 -2219
  47. package/dist/chunk-ULL2LDN3.cjs.map +0 -1
  48. package/dist/chunk-YX4PWMZ6.js +0 -2092
  49. package/dist/chunk-YX4PWMZ6.js.map +0 -1
@@ -1,2204 +0,0 @@
1
- import styled8, { css } from 'styled-components';
2
- import { jsx, jsxs, Fragment } from 'react/jsx-runtime';
3
- import { useButton } from '@react-aria/button';
4
- import { useRef, useState } from 'react';
5
- import { useMeter } from '@react-aria/meter';
6
- import { useTabList, useTabPanel, useTab } from '@react-aria/tabs';
7
- import { Item } from '@react-stately/collections';
8
- import { useTabListState } from '@react-stately/tabs';
9
- import { DisclosureGroup, Disclosure, Button, DisclosurePanel, Heading } from 'react-aria-components';
10
-
11
- // src/components/layout/Icon/Icon.styles.ts
12
- var IconWrapper = styled8.span`
13
- display: inline-flex;
14
- align-items: center;
15
- justify-content: center;
16
- width: ${({ $size }) => $size}px;
17
- height: ${({ $size }) => $size}px;
18
- color: ${({ $color }) => $color};
19
- line-height: 1;
20
-
21
- img {
22
- width: 100%;
23
- height: 100%;
24
- filter: ${({ $color }) => {
25
- if ($color === "currentColor" || !$color) return "inherit";
26
- if ($color === "white" || $color === "#ffffff" || $color === "#fff") {
27
- return "brightness(0) saturate(100%) invert(100%)";
28
- }
29
- if ($color === "#b9bbbe") {
30
- return "brightness(0) saturate(100%) invert(75%) sepia(8%) saturate(223%) hue-rotate(180deg) brightness(94%) contrast(86%)";
31
- }
32
- if ($color === "#ed4245" || $color === "#f04747") {
33
- return "brightness(0) saturate(100%) invert(38%) sepia(97%) saturate(1459%) hue-rotate(334deg) brightness(95%) contrast(93%)";
34
- }
35
- return "none";
36
- }};
37
- }
38
- `;
39
-
40
- // src/components/layout/Icon/icons.ts
41
- var ICON_BASE_PATH = "/assets/icon-set";
42
- var IconNames = {
43
- MIC: "mic-fill",
44
- MIC_OFF: "mic-off-fill",
45
- HEADPHONE: "headphone-fill",
46
- VOLUME_MUTE: "volume-mute-fill",
47
- SETTINGS: "settings-3-fill",
48
- SETTINGS_FILL: "settings-fill",
49
- SETTINGS_LINE: "settings-line",
50
- HOME: "home-fill",
51
- ADD_CIRCLE: "add-circle-fill",
52
- COMPASS_DISCOVER: "compass-discover-fill",
53
- DOWNLOAD: "download-2-fill",
54
- ARROW_LEFT: "arrow-left-fill",
55
- CALENDAR: "calendar-fill",
56
- CHAT: "chat-1-fill"
57
- };
58
- var iconFiles = {
59
- "mic-fill": "Icon-mic-fill.svg",
60
- "mic-off-fill": "Icon-mic-off-fill.svg",
61
- "headphone-fill": "Icon-headphone-fill.svg",
62
- "volume-mute-fill": "Icon-volume-mute-fill.svg",
63
- "settings-3-fill": "Icon-settings-3-fill.svg",
64
- "settings-fill": "Icon-settings-fill.svg",
65
- "settings-line": "Icon-settings-line.svg",
66
- "home-fill": "Icon-home-fill.svg",
67
- "add-circle-fill": "Icon-add-circle-fill.svg",
68
- "compass-discover-fill": "Icon-compass-discover-fill.svg",
69
- "download-2-fill": "Icon-download-2-fill.svg",
70
- "arrow-left-fill": "Icon-arrow-left-fill.svg",
71
- "calendar-fill": "Icon-calendar-fill.svg",
72
- "chat-1-fill": "Icon-chat-1-fill.svg"
73
- };
74
- function getIconPath(name) {
75
- return `${ICON_BASE_PATH}/${iconFiles[name]}`;
76
- }
77
- function Icon({
78
- name,
79
- size = 20,
80
- color = "currentColor",
81
- className,
82
- ...imgProps
83
- }) {
84
- const iconPath = getIconPath(name);
85
- return /* @__PURE__ */ jsx(IconWrapper, { $size: size, $color: color, className, "aria-hidden": "true", children: /* @__PURE__ */ jsx("img", { src: iconPath, alt: "", width: size, height: size, ...imgProps }) });
86
- }
87
- Icon.displayName = "Icon";
88
- var NAV_BG = "#232428";
89
- var NAV_BORDER = "#1E1F22";
90
- var Container = styled8.nav`
91
- position: absolute;
92
- bottom: 0;
93
- left: 0;
94
- right: 0;
95
- background-color: ${NAV_BG};
96
- border-top: 1px solid ${NAV_BORDER};
97
- height: 52px;
98
- z-index: 10;
99
-
100
- /* Dark theme support */
101
- @media (prefers-color-scheme: dark) {
102
- background-color: #1a1b1e;
103
- }
104
- `;
105
- var ContentWrapper = styled8.div`
106
- display: flex;
107
- justify-content: space-between;
108
- align-items: center;
109
- height: 100%;
110
- padding: 0 8px;
111
- max-width: 100%;
112
-
113
- /* Responsive padding */
114
- @media (min-width: 768px) {
115
- padding: 0 16px;
116
- }
117
- `;
118
- var UserStatusSlot = styled8.div`
119
- display: flex;
120
- align-items: center;
121
- min-width: 0; /* Allow flex item to shrink */
122
- flex: 0 1 auto;
123
-
124
- /* Handle overflow for long usernames */
125
- > * {
126
- overflow: hidden;
127
- text-overflow: ellipsis;
128
- white-space: nowrap;
129
- }
130
- `;
131
- var ActionButtonsSlot = styled8.div`
132
- display: flex;
133
- align-items: center;
134
- gap: 4px;
135
- flex-shrink: 0;
136
-
137
- /* Ensure buttons stay visible */
138
- @media (min-width: 480px) {
139
- gap: 8px;
140
- }
141
- `;
142
- function NavHorizontal({
143
- userStatusSlot,
144
- actionsSlot,
145
- className,
146
- "aria-label": ariaLabel = "Horizontal navigation bar"
147
- }) {
148
- return /* @__PURE__ */ jsx(Container, { className, role: "navigation", "aria-label": ariaLabel, children: /* @__PURE__ */ jsxs(ContentWrapper, { children: [
149
- /* @__PURE__ */ jsx(UserStatusSlot, { children: userStatusSlot }),
150
- /* @__PURE__ */ jsx(ActionButtonsSlot, { children: actionsSlot })
151
- ] }) });
152
- }
153
- NavHorizontal.displayName = "NavHorizontal";
154
- var NAV_BG2 = "#202225";
155
- var NAV_SEPARATOR = "#36393F";
156
- var Container2 = styled8.nav`
157
- position: absolute;
158
- top: 0;
159
- left: 0;
160
- bottom: 52px; /* Account for horizontal nav height */
161
- width: 72px;
162
- background-color: ${NAV_BG2};
163
- display: flex;
164
- flex-direction: column;
165
- z-index: 9; /* Below horizontal nav and chat sidebar */
166
- overflow-y: auto;
167
- overflow-x: hidden;
168
- scrollbar-width: none; /* Firefox */
169
-
170
- /* Hide scrollbar for Chrome, Safari and Opera */
171
- &::-webkit-scrollbar {
172
- display: none;
173
- }
174
-
175
- /* Dark theme support */
176
- @media (prefers-color-scheme: dark) {
177
- background-color: #1a1b1e;
178
- }
179
-
180
- /* Responsive adjustments */
181
- @media (max-width: 768px) {
182
- width: 60px; /* Match MainPane left offset on mobile */
183
- }
184
- `;
185
- var TopSection = styled8.div`
186
- display: flex;
187
- flex-direction: column;
188
- align-items: center;
189
- height: 56px; /* Same as PaneSectionHeader on mobile */
190
- padding: 0;
191
- flex-shrink: 0;
192
- position: relative;
193
-
194
- @media (min-width: 768px) {
195
- height: 64px; /* Same as PaneSectionHeader on desktop */
196
- }
197
- `;
198
- var BackButton = styled8.button`
199
- position: absolute;
200
- top: 50%;
201
- left: 50%;
202
- transform: translate(-50%, -50%);
203
- width: 40px;
204
- height: 40px;
205
- border-radius: 50%;
206
- border: none;
207
- background-color: ${NAV_SEPARATOR};
208
- color: #ffffff;
209
- cursor: pointer;
210
- display: flex;
211
- align-items: center;
212
- justify-content: center;
213
- transition: all 0.2s ease-in-out;
214
-
215
- &:hover {
216
- background-color: #5865F2;
217
- }
218
-
219
- &:active {
220
- transform: translate(-50%, -50%) scale(0.95);
221
- }
222
-
223
- &:focus {
224
- outline: none;
225
- }
226
-
227
- &:focus-visible {
228
- outline: 2px solid #5865F2;
229
- outline-offset: 2px;
230
- }
231
- `;
232
- styled8.span`
233
- font-size: 20px;
234
- line-height: 1;
235
- font-weight: bold;
236
- `;
237
- var Separator = styled8.div`
238
- width: 32px;
239
- height: 2px;
240
- background-color: ${NAV_SEPARATOR};
241
- align-self: center;
242
- margin: 8px auto 12px;
243
- border-radius: 1px;
244
- `;
245
- var FolderGroupsSlot = styled8.div`
246
- display: flex;
247
- flex-direction: column;
248
- align-items: center;
249
- gap: 8px;
250
- padding: 0 12px 12px;
251
- flex: 1;
252
-
253
- /* Server/workspace icons styling */
254
- > * {
255
- width: 48px;
256
- height: 48px;
257
- border-radius: 50%;
258
- transition: border-radius 0.15s ease-out;
259
- cursor: pointer;
260
-
261
- &:hover {
262
- border-radius: 16px;
263
- }
264
- }
265
-
266
- /* Responsive adjustments */
267
- @media (max-width: 768px) {
268
- padding: 0 6px 12px; /* Reduce horizontal padding on mobile */
269
- }
270
- `;
271
- function NavVertical({
272
- onBackClick,
273
- onHomeClick,
274
- folderGroupsSlot,
275
- className,
276
- "aria-label": ariaLabel = "Vertical navigation sidebar"
277
- }) {
278
- const backButtonRef = useRef(null);
279
- const homeButtonRef = useRef(null);
280
- const { buttonProps: backButtonProps } = useButton(
281
- {
282
- onPress: onBackClick,
283
- "aria-label": "Go back"
284
- },
285
- backButtonRef
286
- );
287
- const { buttonProps: homeButtonProps } = useButton(
288
- {
289
- onPress: onHomeClick,
290
- "aria-label": "Home"
291
- },
292
- homeButtonRef
293
- );
294
- return /* @__PURE__ */ jsxs(Container2, { className, role: "navigation", "aria-label": ariaLabel, children: [
295
- /* @__PURE__ */ jsx(TopSection, { children: onBackClick ? /* @__PURE__ */ jsx(BackButton, { ...backButtonProps, ref: backButtonRef, children: /* @__PURE__ */ jsx(Icon, { name: "arrow-left-fill", size: 20, color: "white" }) }) : onHomeClick ? /* @__PURE__ */ jsx(BackButton, { ...homeButtonProps, ref: homeButtonRef, children: /* @__PURE__ */ jsx(Icon, { name: "home-fill", size: 24, color: "white" }) }) : null }),
296
- /* @__PURE__ */ jsx(Separator, {}),
297
- /* @__PURE__ */ jsx(FolderGroupsSlot, { children: folderGroupsSlot })
298
- ] });
299
- }
300
- NavVertical.displayName = "NavVertical";
301
- var Container3 = styled8.div`
302
- position: relative;
303
- width: 100%;
304
- height: 100vh;
305
- background-color: #36393f;
306
- overflow: hidden;
307
-
308
- /* Dark theme support */
309
- @media (prefers-color-scheme: dark) {
310
- background-color: #2f3136;
311
- }
312
- `;
313
- var MainPane = styled8.main`
314
- position: absolute;
315
- top: 0;
316
- left: 72px; /* Width of vertical nav */
317
- right: 0;
318
- bottom: 52px; /* Height of horizontal nav */
319
- background-color: #36393f;
320
- overflow: auto;
321
-
322
- /* Custom scrollbar styling */
323
- &::-webkit-scrollbar {
324
- width: 8px;
325
- height: 8px;
326
- }
327
-
328
- &::-webkit-scrollbar-track {
329
- background: transparent;
330
- }
331
-
332
- &::-webkit-scrollbar-thumb {
333
- background-color: #202225;
334
- border-radius: 4px;
335
- }
336
-
337
- &::-webkit-scrollbar-thumb:hover {
338
- background-color: #18191c;
339
- }
340
-
341
- /* Firefox scrollbar */
342
- scrollbar-width: thin;
343
- scrollbar-color: #202225 transparent;
344
-
345
- /* Dark theme support */
346
- @media (prefers-color-scheme: dark) {
347
- background-color: #2f3136;
348
- }
349
-
350
- /* Responsive adjustments */
351
- @media (max-width: 768px) {
352
- left: 60px; /* Smaller nav on mobile */
353
- }
354
- `;
355
- function Layout({
356
- mainPaneSlot,
357
- navVerticalSlot,
358
- navHorizontalUserSlot,
359
- navHorizontalActionsSlot,
360
- onNavBackClick,
361
- className
362
- }) {
363
- return /* @__PURE__ */ jsxs(Container3, { className, children: [
364
- /* @__PURE__ */ jsx(NavVertical, { folderGroupsSlot: navVerticalSlot, onBackClick: onNavBackClick }),
365
- /* @__PURE__ */ jsx(MainPane, { children: mainPaneSlot }),
366
- /* @__PURE__ */ jsx(
367
- NavHorizontal,
368
- {
369
- userStatusSlot: navHorizontalUserSlot,
370
- actionsSlot: navHorizontalActionsSlot
371
- }
372
- )
373
- ] });
374
- }
375
- Layout.displayName = "Layout";
376
- var Container4 = styled8.div`
377
- display: flex;
378
- align-items: center;
379
- justify-content: flex-end;
380
- gap: 4px;
381
- `;
382
- var ActionButton = styled8.button`
383
- width: ${({ $size = 32 }) => $size}px;
384
- height: ${({ $size = 32 }) => $size}px;
385
- min-width: ${({ $size = 32 }) => $size}px;
386
- min-height: ${({ $size = 32 }) => $size}px;
387
- border-radius: ${({ $isPrimary }) => $isPrimary ? "50%" : "4px"};
388
- border: none;
389
- background-color: ${({ $isPrimary }) => $isPrimary ? "#5865F2" : "transparent"};
390
- color: ${({ $isPrimary }) => $isPrimary ? "#FFFFFF" : "#b9bbbe"};
391
- cursor: pointer;
392
- display: flex;
393
- align-items: center;
394
- justify-content: center;
395
- transition: all 0.15s ease;
396
- font-size: 16px;
397
-
398
- &:hover {
399
- background-color: ${({ $isPrimary }) => $isPrimary ? "#4752C4" : "rgba(255, 255, 255, 0.1)"};
400
- color: ${({ $isPrimary }) => $isPrimary ? "#FFFFFF" : "#dcddde"};
401
- }
402
-
403
- &:active {
404
- transform: scale(0.95);
405
- }
406
-
407
- ${({ $isActive, $isPrimary }) => $isActive && !$isPrimary && css`
408
- background-color: rgba(255, 255, 255, 0.08);
409
- color: #ffffff;
410
- `}
411
-
412
- ${({ $isActive, $isPrimary }) => $isActive && $isPrimary && css`
413
- background-color: #4752C4;
414
- color: #ffffff;
415
- `}
416
-
417
- &:focus {
418
- outline: none;
419
- }
420
-
421
- &:focus-visible {
422
- outline: 2px solid #5865f2;
423
- outline-offset: 2px;
424
- }
425
- `;
426
- function ActionButtonItem({ icon, label, onClick, isActive, size, isPrimary }) {
427
- const ref = useRef(null);
428
- const { buttonProps } = useButton(
429
- {
430
- onPress: onClick,
431
- "aria-label": label,
432
- "aria-pressed": isActive
433
- },
434
- ref
435
- );
436
- return /* @__PURE__ */ jsx(
437
- ActionButton,
438
- {
439
- ...buttonProps,
440
- ref,
441
- $isActive: isActive,
442
- $size: size,
443
- $isPrimary: isPrimary,
444
- children: icon
445
- }
446
- );
447
- }
448
- function ActionButtons({
449
- onCalendarClick,
450
- onSettingsClick,
451
- onChatClick,
452
- isCalendarActive = false,
453
- isSettingsActive = false,
454
- isChatActive = false,
455
- className
456
- }) {
457
- return /* @__PURE__ */ jsxs(Container4, { className, children: [
458
- /* @__PURE__ */ jsx(
459
- ActionButtonItem,
460
- {
461
- icon: /* @__PURE__ */ jsx(Icon, { name: "calendar-fill", size: 16, color: "#b9bbbe" }),
462
- label: "Calendar",
463
- onClick: onCalendarClick,
464
- isActive: isCalendarActive,
465
- size: 32
466
- }
467
- ),
468
- /* @__PURE__ */ jsx(
469
- ActionButtonItem,
470
- {
471
- icon: /* @__PURE__ */ jsx(Icon, { name: "settings-3-fill", size: 16, color: "#b9bbbe" }),
472
- label: "Settings",
473
- onClick: onSettingsClick,
474
- isActive: isSettingsActive,
475
- size: 32
476
- }
477
- ),
478
- /* @__PURE__ */ jsx(
479
- ActionButtonItem,
480
- {
481
- icon: /* @__PURE__ */ jsx(Icon, { name: "chat-1-fill", size: 16, color: "#b9bbbe" }),
482
- label: "Chat",
483
- onClick: onChatClick,
484
- isActive: isChatActive,
485
- size: 32
486
- }
487
- )
488
- ] });
489
- }
490
- ActionButtons.displayName = "ActionButtons";
491
- var statusColors = {
492
- online: "#43B581",
493
- idle: "#FAA61A",
494
- busy: "#F04747",
495
- offline: "#747F8D"
496
- };
497
- var Container5 = styled8.button`
498
- display: flex;
499
- align-items: center;
500
- gap: 8px;
501
- padding: 4px 6px;
502
- border-radius: 4px;
503
- border: none;
504
- background: transparent;
505
- color: inherit;
506
- font: inherit;
507
- transition: background-color 0.2s ease, opacity 0.2s ease;
508
- cursor: ${(props) => props.$isDisabled ? "not-allowed" : "pointer"};
509
- opacity: ${(props) => props.$isDisabled ? 0.5 : 1};
510
- text-align: left;
511
- width: 100%;
512
-
513
- &:hover:not(:disabled) {
514
- background-color: rgba(255, 255, 255, 0.05);
515
- }
516
-
517
- &:focus-visible {
518
- outline: 2px solid #5865F2;
519
- outline-offset: 2px;
520
- }
521
-
522
- &:active:not(:disabled) {
523
- background-color: rgba(255, 255, 255, 0.08);
524
- }
525
- `;
526
- var IconWrapper2 = styled8.div`
527
- position: relative;
528
- width: 32px;
529
- height: 32px;
530
- border-radius: 8px;
531
- background-color: #36393f;
532
- display: flex;
533
- align-items: center;
534
- justify-content: center;
535
- flex-shrink: 0;
536
- overflow: hidden;
537
- `;
538
- var WorkflowInfo = styled8.div`
539
- display: flex;
540
- flex-direction: column;
541
- min-width: 0;
542
- `;
543
- var WorkflowName = styled8.span`
544
- color: #ffffff;
545
- font-size: 13px;
546
- font-weight: 600;
547
- line-height: 1.2;
548
- overflow: hidden;
549
- text-overflow: ellipsis;
550
- white-space: nowrap;
551
- `;
552
- var WorkflowStatus = styled8.div`
553
- display: flex;
554
- align-items: center;
555
- gap: 4px;
556
- color: #b9bbbe;
557
- font-size: 11px;
558
- line-height: 1.2;
559
- `;
560
- var StatusIndicatorOuter = styled8.span`
561
- position: absolute;
562
- bottom: -2px;
563
- right: -2px;
564
- width: 10px;
565
- height: 10px;
566
- border-radius: 50%;
567
- background-color: #232428;
568
- display: flex;
569
- align-items: center;
570
- justify-content: center;
571
- flex-shrink: 0;
572
- `;
573
- var StatusIndicatorInner = styled8.span`
574
- width: 6px;
575
- height: 6px;
576
- border-radius: 50%;
577
- background-color: ${({ $status }) => statusColors[$status]};
578
- flex-shrink: 0;
579
- `;
580
- function WorkflowStatusCard({
581
- icon,
582
- workflowName,
583
- status = "offline",
584
- statusText,
585
- className,
586
- onClick,
587
- onPress,
588
- isDisabled,
589
- ...ariaProps
590
- }) {
591
- const displayStatus = statusText || status;
592
- const ref = useRef(null);
593
- const handlePress = () => {
594
- if (onClick) onClick();
595
- if (onPress) onPress({});
596
- };
597
- const { buttonProps } = useButton(
598
- {
599
- ...ariaProps,
600
- onPress: handlePress,
601
- isDisabled,
602
- "aria-label": ariaProps["aria-label"] || `${workflowName} workflow, status: ${displayStatus}`
603
- },
604
- ref
605
- );
606
- return /* @__PURE__ */ jsxs(Container5, { ...buttonProps, ref, className, $isDisabled: isDisabled, children: [
607
- /* @__PURE__ */ jsxs(IconWrapper2, { children: [
608
- icon,
609
- /* @__PURE__ */ jsx(StatusIndicatorOuter, { $status: status, children: /* @__PURE__ */ jsx(StatusIndicatorInner, { $status: status }) })
610
- ] }),
611
- /* @__PURE__ */ jsxs(WorkflowInfo, { children: [
612
- /* @__PURE__ */ jsx(WorkflowName, { children: workflowName }),
613
- /* @__PURE__ */ jsx(WorkflowStatus, { children: displayStatus })
614
- ] })
615
- ] });
616
- }
617
- WorkflowStatusCard.displayName = "WorkflowStatusCard";
618
- var BG_TERTIARY = "#36393F";
619
- var TEXT_PRIMARY = "#FFFFFF";
620
- var TEXT_SECONDARY = "#B9BBBE";
621
- var TEXT_MUTED = "#72767D";
622
- var ACCENT_COLOR = "#5865F2";
623
- var HOVER_BG = "rgba(255, 255, 255, 0.05)";
624
- var DarkNotificationCardContainer = styled8.div`
625
- display: flex;
626
- flex-direction: column;
627
- padding: 6px;
628
- background: ${BG_TERTIARY};
629
- border-radius: 8px;
630
- gap: 4px;
631
- flex: 1;
632
- min-width: 0;
633
- overflow: hidden;
634
- `;
635
- var DarkSectionHeader = styled8.button`
636
- display: flex;
637
- align-items: center;
638
- justify-content: space-between;
639
- width: 100%;
640
- padding: 4px 2px;
641
- border: none;
642
- background: transparent;
643
- font-family: ${(props) => props.theme?.fonts?.body || "system-ui, sans-serif"};
644
- font-size: 11px;
645
- font-weight: 600;
646
- color: ${TEXT_SECONDARY};
647
- text-align: left;
648
- cursor: pointer;
649
- transition: all 0.2s ease;
650
-
651
- &:hover {
652
- color: ${TEXT_PRIMARY};
653
- }
654
-
655
- &:focus-visible {
656
- outline: 2px solid ${ACCENT_COLOR};
657
- outline-offset: 2px;
658
- border-radius: 4px;
659
- }
660
- `;
661
- var DarkChevronIcon = styled8.span`
662
- display: inline-flex;
663
- align-items: center;
664
- justify-content: center;
665
- transition: transform 0.2s ease;
666
- color: ${TEXT_MUTED};
667
-
668
- ${(props) => props.$isExpanded ? `
669
- transform: rotate(0deg);
670
- ` : `
671
- transform: rotate(-90deg);
672
- `}
673
-
674
- svg {
675
- width: 12px;
676
- height: 12px;
677
- }
678
- `;
679
- var DarkSectionContent = styled8.div`
680
- display: flex;
681
- flex-direction: column;
682
- gap: 2px;
683
- padding-left: 4px;
684
- margin-top: 2px;
685
- min-width: 0;
686
- overflow: hidden;
687
- `;
688
- var DarkNotificationItemWrapper = styled8.button`
689
- display: flex;
690
- align-items: center;
691
- gap: 6px;
692
- width: 100%;
693
- padding: 4px 6px;
694
- border: none;
695
- cursor: pointer;
696
- text-align: left;
697
- transition: all 0.2s ease;
698
- border-radius: 4px;
699
- min-width: 0;
700
- overflow: hidden;
701
-
702
- /* Default state - transparent background */
703
- background-color: ${(props) => props.$isSelected ? ACCENT_COLOR : "transparent"};
704
-
705
- /* Hover state */
706
- &:hover:not(:disabled) {
707
- background-color: ${(props) => props.$isSelected ? "#4752C4" : HOVER_BG};
708
- }
709
-
710
- /* Active state */
711
- &:active:not(:disabled) {
712
- transform: scale(0.99);
713
- }
714
-
715
- /* Focus state */
716
- &:focus-visible {
717
- outline: 2px solid ${ACCENT_COLOR};
718
- outline-offset: 2px;
719
- }
720
-
721
- /* Disabled state */
722
- &:disabled {
723
- cursor: not-allowed;
724
- opacity: 0.5;
725
- }
726
- `;
727
- var DarkItemIcon = styled8.span`
728
- display: inline-flex;
729
- align-items: center;
730
- justify-content: center;
731
- width: 16px;
732
- height: 16px;
733
- flex-shrink: 0;
734
- border-radius: ${(props) => props.$hasCustomIcon ? "4px" : "50%"};
735
- background-color: ${(props) => props.$iconColor || "transparent"};
736
- color: ${(props) => props.$hasCustomIcon ? TEXT_PRIMARY : TEXT_MUTED};
737
- font-size: 12px;
738
-
739
- /* Default circle icon styling */
740
- ${(props) => !props.$hasCustomIcon && `
741
- svg {
742
- width: 14px;
743
- height: 14px;
744
- }
745
- `}
746
-
747
- /* Custom icon (emoji or colored icon) styling */
748
- ${(props) => props.$hasCustomIcon && `
749
- padding: 2px;
750
- `}
751
- `;
752
- var DarkItemText = styled8.span`
753
- flex: 1;
754
- font-family: ${(props) => props.theme?.fonts?.body || "system-ui, sans-serif"};
755
- font-size: 11px;
756
- font-weight: ${(props) => props.$isSelected ? "500" : "400"};
757
- color: ${(props) => props.$isSelected ? TEXT_PRIMARY : TEXT_SECONDARY};
758
- line-height: 1.3;
759
- word-wrap: break-word;
760
- min-width: 0;
761
- overflow: hidden;
762
- text-overflow: ellipsis;
763
- `;
764
- var DarkMenuButton = styled8.button`
765
- display: inline-flex;
766
- align-items: center;
767
- justify-content: center;
768
- width: 20px;
769
- height: 20px;
770
- padding: 0;
771
- border: none;
772
- border-radius: 4px;
773
- background-color: transparent;
774
- color: ${TEXT_PRIMARY};
775
- cursor: pointer;
776
- transition: all 0.2s ease;
777
- flex-shrink: 0;
778
-
779
- &:hover:not(:disabled) {
780
- background-color: rgba(255, 255, 255, 0.1);
781
- }
782
-
783
- &:active:not(:disabled) {
784
- background-color: rgba(255, 255, 255, 0.15);
785
- transform: scale(0.95);
786
- }
787
-
788
- &:focus-visible {
789
- outline: 2px solid ${ACCENT_COLOR};
790
- outline-offset: 2px;
791
- }
792
-
793
- svg {
794
- width: 14px;
795
- height: 14px;
796
- }
797
- `;
798
- var DarkTimestamp = styled8.span`
799
- font-size: 10px;
800
- color: ${TEXT_MUTED};
801
- white-space: normal;
802
- word-wrap: break-word;
803
- text-align: right;
804
- max-width: 60px;
805
- `;
806
- var DarkNotificationCard = ({
807
- sections,
808
- onItemClick,
809
- selectedItemId,
810
- onMenuClick,
811
- className,
812
- "aria-label": ariaLabel = "Action log history"
813
- }) => {
814
- const [collapsedSections, setCollapsedSections] = useState(() => {
815
- const initial = {};
816
- for (const section of sections) {
817
- initial[section.title] = section.isCollapsed || false;
818
- }
819
- return initial;
820
- });
821
- const toggleSection = (sectionTitle) => {
822
- setCollapsedSections((prev) => ({
823
- ...prev,
824
- [sectionTitle]: !prev[sectionTitle]
825
- }));
826
- };
827
- return /* @__PURE__ */ jsx(DarkNotificationCardContainer, { className, "aria-label": ariaLabel, role: "region", children: sections.map((section) => /* @__PURE__ */ jsx(
828
- DarkSectionComponent,
829
- {
830
- section,
831
- isCollapsed: collapsedSections[section.title] ?? false,
832
- onToggle: () => toggleSection(section.title),
833
- onItemClick,
834
- selectedItemId,
835
- onMenuClick
836
- },
837
- section.title
838
- )) });
839
- };
840
- var DarkSectionComponent = ({
841
- section,
842
- isCollapsed,
843
- onToggle,
844
- onItemClick,
845
- selectedItemId,
846
- onMenuClick
847
- }) => {
848
- const headerRef = useRef(null);
849
- const { buttonProps } = useButton(
850
- {
851
- onPress: onToggle,
852
- "aria-label": `${section.title} section, ${isCollapsed ? "collapsed" : "expanded"}`,
853
- "aria-expanded": !isCollapsed
854
- },
855
- headerRef
856
- );
857
- return /* @__PURE__ */ jsxs("section", { "aria-label": `${section.title} actions`, children: [
858
- /* @__PURE__ */ jsxs(DarkSectionHeader, { ...buttonProps, ref: headerRef, children: [
859
- section.title,
860
- /* @__PURE__ */ jsx(DarkChevronIcon, { $isExpanded: !isCollapsed, "aria-hidden": "true", children: /* @__PURE__ */ jsxs(
861
- "svg",
862
- {
863
- width: "14",
864
- height: "14",
865
- viewBox: "0 0 14 14",
866
- fill: "none",
867
- xmlns: "http://www.w3.org/2000/svg",
868
- role: "img",
869
- "aria-label": "Expand/collapse icon",
870
- children: [
871
- /* @__PURE__ */ jsx("title", { children: "Expand/collapse icon" }),
872
- /* @__PURE__ */ jsx(
873
- "path",
874
- {
875
- d: "M4 5L7 8L10 5",
876
- stroke: "currentColor",
877
- strokeWidth: "1.5",
878
- strokeLinecap: "round",
879
- strokeLinejoin: "round"
880
- }
881
- )
882
- ]
883
- }
884
- ) })
885
- ] }),
886
- !isCollapsed && /* @__PURE__ */ jsx(DarkSectionContent, { role: "list", children: section.items.map((item) => /* @__PURE__ */ jsx(
887
- DarkNotificationItemComponent,
888
- {
889
- item,
890
- isSelected: item.id === selectedItemId,
891
- onItemClick,
892
- onMenuClick
893
- },
894
- item.id
895
- )) })
896
- ] });
897
- };
898
- var DarkNotificationItemComponent = ({
899
- item,
900
- isSelected,
901
- onItemClick,
902
- onMenuClick
903
- }) => {
904
- const itemRef = useRef(null);
905
- const menuRef = useRef(null);
906
- const { buttonProps: itemButtonProps } = useButton(
907
- {
908
- onPress: () => onItemClick?.(item),
909
- "aria-label": `Action: ${item.text}`,
910
- "aria-current": isSelected ? "true" : void 0
911
- },
912
- itemRef
913
- );
914
- const { buttonProps: menuButtonProps } = useButton(
915
- {
916
- onPress: () => onMenuClick?.(item),
917
- "aria-label": `Options for ${item.text}`
918
- },
919
- menuRef
920
- );
921
- const handleItemKeyDown = (e) => {
922
- if (isSelected && e.key === "Tab" && !e.shiftKey) {
923
- return;
924
- }
925
- };
926
- return /* @__PURE__ */ jsxs(
927
- DarkNotificationItemWrapper,
928
- {
929
- ...itemButtonProps,
930
- ref: itemRef,
931
- $isSelected: isSelected,
932
- $hasIcon: !!item.icon,
933
- role: "listitem",
934
- onKeyDown: handleItemKeyDown,
935
- children: [
936
- /* @__PURE__ */ jsx(DarkItemIcon, { $iconColor: item.iconColor, $hasCustomIcon: !!item.icon, children: item.icon || /* @__PURE__ */ jsx(
937
- "svg",
938
- {
939
- width: "16",
940
- height: "16",
941
- viewBox: "0 0 16 16",
942
- fill: "none",
943
- xmlns: "http://www.w3.org/2000/svg",
944
- "aria-hidden": "true",
945
- children: /* @__PURE__ */ jsx("circle", { cx: "8", cy: "8", r: "6", stroke: "currentColor", strokeWidth: "1.5" })
946
- }
947
- ) }),
948
- /* @__PURE__ */ jsx(DarkItemText, { $isSelected: isSelected, children: item.text }),
949
- item.timestamp && /* @__PURE__ */ jsx(DarkTimestamp, { children: item.timestamp }),
950
- isSelected && onMenuClick && /* @__PURE__ */ jsx(
951
- DarkMenuButton,
952
- {
953
- ...menuButtonProps,
954
- ref: menuRef,
955
- onClick: (e) => {
956
- e.stopPropagation();
957
- menuButtonProps.onClick?.(e);
958
- },
959
- children: /* @__PURE__ */ jsxs(
960
- "svg",
961
- {
962
- width: "16",
963
- height: "16",
964
- viewBox: "0 0 16 16",
965
- fill: "none",
966
- xmlns: "http://www.w3.org/2000/svg",
967
- "aria-hidden": "true",
968
- children: [
969
- /* @__PURE__ */ jsx("title", { children: "More options" }),
970
- /* @__PURE__ */ jsx("circle", { cx: "8", cy: "3", r: "1", fill: "currentColor" }),
971
- /* @__PURE__ */ jsx("circle", { cx: "8", cy: "8", r: "1", fill: "currentColor" }),
972
- /* @__PURE__ */ jsx("circle", { cx: "8", cy: "13", r: "1", fill: "currentColor" })
973
- ]
974
- }
975
- )
976
- }
977
- )
978
- ]
979
- }
980
- );
981
- };
982
- DarkNotificationCard.displayName = "DarkNotificationCard";
983
- var BG_PRIMARY = "#2F3136";
984
- var BG_SECONDARY = "#202225";
985
- var BG_TERTIARY2 = "#36393F";
986
- var TEXT_PRIMARY2 = "#FFFFFF";
987
- var TEXT_SECONDARY2 = "#B9BBBE";
988
- var TEXT_MUTED2 = "#72767D";
989
- var ACCENT_COLOR2 = "#5865F2";
990
- var HOVER_BG2 = "rgba(255, 255, 255, 0.05)";
991
- var Container6 = styled8.div`
992
- width: 100%;
993
- height: 100%;
994
- background-color: ${BG_PRIMARY};
995
- color: ${TEXT_PRIMARY2};
996
- display: flex;
997
- flex-direction: column;
998
- font-family: ${(props) => props.theme?.fonts?.body || "system-ui, sans-serif"};
999
- overflow: hidden; // Prevent content from escaping container bounds
1000
- `;
1001
- var TabListWrapper = styled8.div`
1002
- display: flex;
1003
- border-bottom: 2px solid ${BG_TERTIARY2};
1004
- background-color: ${BG_SECONDARY};
1005
- padding: 0 16px;
1006
- gap: 8px;
1007
- overflow-x: auto;
1008
- scrollbar-width: none;
1009
- -ms-overflow-style: none;
1010
- flex-shrink: 0; // Prevent shrinking when content overflows
1011
-
1012
- &::-webkit-scrollbar {
1013
- display: none;
1014
- }
1015
-
1016
- @media (max-width: 640px) {
1017
- padding: 0 8px;
1018
- gap: 4px;
1019
- }
1020
- `;
1021
- var TabButton = styled8.button`
1022
- padding: 12px 20px;
1023
- background: none;
1024
- border: none;
1025
- color: ${(props) => props.$isSelected ? TEXT_PRIMARY2 : TEXT_SECONDARY2};
1026
- font-size: 14px;
1027
- font-weight: 600;
1028
- cursor: pointer;
1029
- position: relative;
1030
- transition: color 0.2s ease;
1031
- white-space: nowrap;
1032
- flex-shrink: 0;
1033
-
1034
- @media (max-width: 640px) {
1035
- padding: 10px 12px;
1036
- font-size: 12px;
1037
- }
1038
-
1039
- &:hover {
1040
- color: ${TEXT_PRIMARY2};
1041
- }
1042
-
1043
- &:focus {
1044
- outline: none;
1045
- }
1046
-
1047
- &:focus-visible {
1048
- outline: 2px solid ${ACCENT_COLOR2};
1049
- outline-offset: -2px;
1050
- border-radius: 4px;
1051
- }
1052
-
1053
- ${(props) => props.$isSelected && `
1054
- &::after {
1055
- content: '';
1056
- position: absolute;
1057
- bottom: -2px;
1058
- left: 0;
1059
- right: 0;
1060
- height: 2px;
1061
- background-color: ${ACCENT_COLOR2};
1062
- }
1063
- `}
1064
- `;
1065
- var TabPanelWrapper = styled8.div`
1066
- flex: 1;
1067
- padding: 24px;
1068
- overflow-y: auto;
1069
- overflow-x: hidden; // Prevent horizontal overflow
1070
- background-color: ${BG_PRIMARY};
1071
- min-height: 0; // Enable proper flex shrinking and scrolling
1072
-
1073
- @media (max-width: 640px) {
1074
- padding: 16px;
1075
- }
1076
-
1077
- @media (max-width: 480px) {
1078
- padding: 12px;
1079
- }
1080
-
1081
- /* Custom scrollbar */
1082
- scrollbar-width: thin;
1083
- scrollbar-color: ${BG_TERTIARY2} ${BG_PRIMARY};
1084
-
1085
- &::-webkit-scrollbar {
1086
- width: 8px;
1087
- }
1088
-
1089
- &::-webkit-scrollbar-track {
1090
- background: ${BG_PRIMARY};
1091
- }
1092
-
1093
- &::-webkit-scrollbar-thumb {
1094
- background: ${BG_TERTIARY2};
1095
- border-radius: 4px;
1096
- }
1097
-
1098
- &::-webkit-scrollbar-thumb:hover {
1099
- background: #4a4d52;
1100
- }
1101
- `;
1102
- var RunsContainer = styled8.div`
1103
- display: flex;
1104
- flex-direction: column;
1105
- gap: 20px;
1106
- width: 100%;
1107
- flex: 1;
1108
- min-width: 0;
1109
- overflow: hidden;
1110
-
1111
- @media (max-width: 640px) {
1112
- gap: 16px;
1113
- }
1114
- `;
1115
- var BrowseButton = styled8.button`
1116
- display: flex;
1117
- align-items: center;
1118
- gap: 12px;
1119
- width: 100%;
1120
- padding: 12px 16px;
1121
- background-color: ${BG_SECONDARY};
1122
- border: 1px solid ${BG_TERTIARY2};
1123
- border-radius: 8px;
1124
- color: ${TEXT_SECONDARY2};
1125
- font-size: 14px;
1126
- font-weight: 500;
1127
- cursor: pointer;
1128
- transition: all 0.2s ease;
1129
- white-space: nowrap;
1130
- overflow: hidden;
1131
-
1132
- @media (max-width: 640px) {
1133
- padding: 10px 12px;
1134
- font-size: 13px;
1135
- gap: 8px;
1136
- }
1137
-
1138
- &:hover {
1139
- background-color: ${HOVER_BG2};
1140
- color: ${TEXT_PRIMARY2};
1141
- }
1142
-
1143
- &:focus {
1144
- outline: none;
1145
- }
1146
-
1147
- &:focus-visible {
1148
- outline: 2px solid ${ACCENT_COLOR2};
1149
- outline-offset: 2px;
1150
- }
1151
- `;
1152
- var StyledDisclosureGroup = styled8(DisclosureGroup)`
1153
- display: flex;
1154
- flex-direction: column;
1155
- gap: 8px;
1156
- width: 100%;
1157
- flex: 1;
1158
- min-width: 0;
1159
- overflow: hidden;
1160
- `;
1161
- var CategoryDisclosure = styled8(Disclosure)`
1162
- background-color: transparent;
1163
- display: flex;
1164
- flex-direction: column;
1165
- width: 100%;
1166
- flex: 1;
1167
- min-width: 0;
1168
- overflow: hidden;
1169
-
1170
- &[data-expanded] {
1171
- /* Styles when expanded */
1172
- }
1173
-
1174
- &[data-disabled] {
1175
- opacity: 0.5;
1176
- cursor: not-allowed;
1177
- }
1178
- `;
1179
- var CategoryHeader = styled8(Button)`
1180
- width: 100%;
1181
- padding: 4px 0;
1182
- background: none;
1183
- border: none;
1184
- color: ${TEXT_SECONDARY2};
1185
- display: flex;
1186
- justify-content: space-between;
1187
- align-items: center;
1188
- cursor: pointer;
1189
- transition: color 0.2s ease;
1190
- font-size: 12px;
1191
- font-weight: 600;
1192
- text-transform: uppercase;
1193
- letter-spacing: 0.5px;
1194
-
1195
- &:hover {
1196
- color: ${TEXT_PRIMARY2};
1197
- }
1198
-
1199
- &:focus {
1200
- outline: none;
1201
- }
1202
-
1203
- &[data-focus-visible] {
1204
- outline: 2px solid ${ACCENT_COLOR2};
1205
- outline-offset: 2px;
1206
- border-radius: 4px;
1207
- }
1208
- `;
1209
- var CategoryTitle = styled8.div`
1210
- display: flex;
1211
- align-items: center;
1212
- gap: 8px;
1213
-
1214
- @media (max-width: 640px) {
1215
- gap: 6px;
1216
- }
1217
- `;
1218
- styled8.img`
1219
- width: 16px;
1220
- height: 16px;
1221
- opacity: 0.6;
1222
- flex-shrink: 0;
1223
-
1224
- @media (max-width: 640px) {
1225
- width: 14px;
1226
- height: 14px;
1227
- }
1228
- `;
1229
- var HashtagIcon = styled8.img`
1230
- width: 14px;
1231
- height: 14px;
1232
- opacity: 0.6;
1233
- flex-shrink: 0;
1234
-
1235
- @media (max-width: 640px) {
1236
- width: 12px;
1237
- height: 12px;
1238
- }
1239
- `;
1240
- var ChevronIcon = styled8.div`
1241
- display: flex;
1242
- align-items: center;
1243
- transition: transform 0.2s ease;
1244
- transform: ${(props) => props.$isExpanded ? "rotate(0deg)" : "rotate(-90deg)"};
1245
- flex-shrink: 0;
1246
- margin-left: 4px;
1247
-
1248
- img {
1249
- width: 16px;
1250
- height: 16px;
1251
- opacity: 0.6;
1252
- }
1253
-
1254
- @media (max-width: 640px) {
1255
- img {
1256
- width: 14px;
1257
- height: 14px;
1258
- }
1259
- }
1260
- `;
1261
- var CategoryDisclosurePanel = styled8(DisclosurePanel)`
1262
- display: flex;
1263
- flex-direction: column;
1264
- gap: 2px;
1265
- padding-left: 4px;
1266
- width: 100%;
1267
- flex: 1;
1268
- min-width: 0;
1269
- overflow: hidden;
1270
-
1271
- @media (max-width: 640px) {
1272
- padding-left: 2px;
1273
- }
1274
-
1275
- &[data-entering] {
1276
- animation: slideDown 0.2s ease;
1277
- }
1278
-
1279
- @keyframes slideDown {
1280
- from {
1281
- opacity: 0;
1282
- transform: translateY(-8px);
1283
- }
1284
- to {
1285
- opacity: 1;
1286
- transform: translateY(0);
1287
- }
1288
- }
1289
- `;
1290
- var ItemContainer = styled8.div`
1291
- display: flex;
1292
- align-items: center;
1293
- gap: 8px;
1294
- padding: 4px 8px;
1295
- border-radius: 4px;
1296
- cursor: pointer;
1297
- transition: background-color 0.1s ease;
1298
- min-width: 0;
1299
- overflow: hidden;
1300
-
1301
- @media (max-width: 640px) {
1302
- gap: 6px;
1303
- padding: 4px 6px;
1304
- }
1305
-
1306
- &:hover {
1307
- background-color: ${HOVER_BG2};
1308
- }
1309
- `;
1310
- var ItemDisclosure = styled8(Disclosure)`
1311
- background-color: transparent;
1312
- margin-bottom: 4px;
1313
- display: flex;
1314
- flex-direction: column;
1315
- width: 100%;
1316
- flex: 1;
1317
- min-width: 0;
1318
- overflow: hidden;
1319
-
1320
- &[data-expanded] {
1321
- background-color: ${BG_SECONDARY};
1322
- border-radius: 8px;
1323
- }
1324
- `;
1325
- var ItemHeader = styled8(Button)`
1326
- width: 100%;
1327
- padding: 0;
1328
- background: none;
1329
- border: none;
1330
- cursor: pointer;
1331
- transition: all 0.1s ease;
1332
-
1333
- &:focus {
1334
- outline: none;
1335
- }
1336
-
1337
- &[data-focus-visible] {
1338
- outline: 2px solid ${ACCENT_COLOR2};
1339
- outline-offset: 2px;
1340
- border-radius: 4px;
1341
- }
1342
- `;
1343
- var ItemDisclosurePanel = styled8(DisclosurePanel)`
1344
- padding: 6px;
1345
- background-color: ${BG_SECONDARY};
1346
- border-radius: 0 0 8px 8px;
1347
- margin-top: -4px;
1348
- display: flex;
1349
- flex-direction: column;
1350
- flex: 1;
1351
- min-width: 0;
1352
- overflow: hidden;
1353
-
1354
- @media (max-width: 640px) {
1355
- padding: 6px;
1356
- }
1357
-
1358
- &[data-entering] {
1359
- animation: slideDown 0.2s ease;
1360
- }
1361
-
1362
- @keyframes slideDown {
1363
- from {
1364
- opacity: 0;
1365
- transform: translateY(-8px);
1366
- }
1367
- to {
1368
- opacity: 1;
1369
- transform: translateY(0);
1370
- }
1371
- }
1372
- `;
1373
- var ItemIcon = styled8.img`
1374
- width: 20px;
1375
- height: 20px;
1376
- opacity: 0.6;
1377
- flex-shrink: 0;
1378
-
1379
- @media (max-width: 640px) {
1380
- width: 18px;
1381
- height: 18px;
1382
- }
1383
- `;
1384
- var ItemName = styled8.span`
1385
- flex: 1;
1386
- font-size: 14px;
1387
- color: ${(props) => props.$dimmed ? TEXT_MUTED2 : TEXT_SECONDARY2};
1388
- font-weight: ${(props) => props.$dimmed ? "normal" : "500"};
1389
- overflow: hidden;
1390
- text-overflow: ellipsis;
1391
- white-space: nowrap;
1392
- min-width: 0;
1393
-
1394
- @media (max-width: 640px) {
1395
- font-size: 13px;
1396
- }
1397
-
1398
- ${ItemContainer}:hover & {
1399
- color: ${(props) => props.$dimmed ? TEXT_SECONDARY2 : TEXT_PRIMARY2};
1400
- }
1401
- `;
1402
- var RunStatus = styled8.span`
1403
- font-size: 14px;
1404
- font-weight: 500;
1405
- flex-shrink: 0;
1406
- margin-left: auto;
1407
- color: ${(props) => {
1408
- switch (props.$status) {
1409
- case "completed":
1410
- return "#10b981";
1411
- // green
1412
- case "running":
1413
- return "#f59e0b";
1414
- // yellow
1415
- case "failed":
1416
- return "#ef4444";
1417
- // red
1418
- default:
1419
- return TEXT_SECONDARY2;
1420
- }
1421
- }};
1422
-
1423
- @media (max-width: 640px) {
1424
- font-size: 12px;
1425
- }
1426
- `;
1427
- styled8.div`
1428
- margin-bottom: 12px;
1429
- border-radius: 12px;
1430
- background-color: ${BG_SECONDARY};
1431
- overflow: hidden;
1432
- `;
1433
- styled8.button`
1434
- width: 100%;
1435
- padding: 16px;
1436
- background: ${BG_SECONDARY};
1437
- border: none;
1438
- color: ${TEXT_PRIMARY2};
1439
- display: flex;
1440
- justify-content: space-between;
1441
- align-items: center;
1442
- cursor: pointer;
1443
- transition: background-color 0.2s ease;
1444
- text-align: left;
1445
-
1446
- &:hover {
1447
- background-color: ${HOVER_BG2};
1448
- }
1449
-
1450
- &:focus {
1451
- outline: none;
1452
- }
1453
-
1454
- &:focus-visible {
1455
- outline: 2px solid ${ACCENT_COLOR2};
1456
- outline-offset: -2px;
1457
- }
1458
-
1459
- > div {
1460
- flex: 1;
1461
- }
1462
-
1463
- strong {
1464
- display: block;
1465
- font-size: 14px;
1466
- margin-bottom: 4px;
1467
- }
1468
- `;
1469
- styled8.span`
1470
- font-size: 12px;
1471
- color: ${TEXT_SECONDARY2};
1472
- transition: transform 0.2s ease;
1473
- transform: ${(props) => props.$isExpanded ? "rotate(180deg)" : "rotate(0deg)"};
1474
- `;
1475
- styled8.div`
1476
- padding: 16px;
1477
- padding-top: 0;
1478
- background-color: ${BG_TERTIARY2};
1479
- color: ${TEXT_SECONDARY2};
1480
- font-size: 13px;
1481
- line-height: 1.6;
1482
- animation: slideDown 0.2s ease;
1483
-
1484
- @keyframes slideDown {
1485
- from {
1486
- opacity: 0;
1487
- transform: translateY(-8px);
1488
- }
1489
- to {
1490
- opacity: 1;
1491
- transform: translateY(0);
1492
- }
1493
- }
1494
- `;
1495
- var MeterContainer = styled8.div`
1496
- max-width: 600px;
1497
- margin: 0 auto;
1498
- `;
1499
- var MeterLabel = styled8.div`
1500
- font-size: 16px;
1501
- font-weight: 600;
1502
- margin-bottom: 16px;
1503
- color: ${TEXT_PRIMARY2};
1504
- `;
1505
- var MeterBar = styled8.div`
1506
- width: 100%;
1507
- height: 24px;
1508
- background-color: ${BG_SECONDARY};
1509
- border-radius: 12px;
1510
- overflow: hidden;
1511
- position: relative;
1512
- margin-bottom: 12px;
1513
- `;
1514
- var MeterFill = styled8.div`
1515
- height: 100%;
1516
- width: ${(props) => props.$percentage}%;
1517
- background: linear-gradient(90deg, ${(props) => props.$color}dd, ${(props) => props.$color});
1518
- border-radius: 12px;
1519
- transition: width 0.3s ease, background 0.3s ease;
1520
- position: relative;
1521
-
1522
- &::after {
1523
- content: '';
1524
- position: absolute;
1525
- top: 0;
1526
- left: 0;
1527
- right: 0;
1528
- bottom: 0;
1529
- background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
1530
- animation: shimmer 2s infinite;
1531
- }
1532
-
1533
- @keyframes shimmer {
1534
- 0% {
1535
- transform: translateX(-100%);
1536
- }
1537
- 100% {
1538
- transform: translateX(100%);
1539
- }
1540
- }
1541
- `;
1542
- var MeterStats = styled8.div`
1543
- font-size: 14px;
1544
- color: ${TEXT_SECONDARY2};
1545
- text-align: center;
1546
-
1547
- small {
1548
- font-size: 12px;
1549
- color: ${TEXT_SECONDARY2};
1550
- opacity: 0.8;
1551
- }
1552
- `;
1553
- var ConnectionsContainer = styled8.div`
1554
- max-width: 500px;
1555
- margin: 0 auto;
1556
- text-align: center;
1557
- `;
1558
- var ConnectionDescription = styled8.p`
1559
- font-size: 14px;
1560
- color: ${TEXT_SECONDARY2};
1561
- line-height: 1.6;
1562
- margin-bottom: 24px;
1563
- `;
1564
- var GoogleButton = styled8.button`
1565
- width: 100%;
1566
- padding: 16px 24px;
1567
- font-size: 15px;
1568
- font-weight: 600;
1569
- color: ${(props) => props.$isConnected ? TEXT_PRIMARY2 : "#FFFFFF"};
1570
- background: ${(props) => props.$isConnected ? BG_TERTIARY2 : "linear-gradient(135deg, #4285F4, #34A853)"};
1571
- border: none;
1572
- border-radius: 8px;
1573
- cursor: pointer;
1574
- transition: all 0.2s ease;
1575
- display: flex;
1576
- align-items: center;
1577
- justify-content: center;
1578
- gap: 8px;
1579
-
1580
- &:hover {
1581
- transform: translateY(-2px);
1582
- box-shadow: 0 4px 12px rgba(66, 133, 244, 0.3);
1583
- }
1584
-
1585
- &:active {
1586
- transform: translateY(0);
1587
- }
1588
-
1589
- &:focus {
1590
- outline: none;
1591
- }
1592
-
1593
- &:focus-visible {
1594
- outline: 2px solid ${ACCENT_COLOR2};
1595
- outline-offset: 2px;
1596
- }
1597
-
1598
- ${(props) => props.$isConnected && `
1599
- &:hover {
1600
- background-color: #ef4444;
1601
- box-shadow: 0 4px 12px rgba(239, 68, 68, 0.3);
1602
- }
1603
- `}
1604
- `;
1605
- var ICONS = {
1606
- hashtag: "/assets/icon-set/Icon-hashtag.svg",
1607
- bell: "/assets/icon-set/Icon-bell-fill.svg",
1608
- file: "/assets/icon-set/Icon-file-3-fill.svg",
1609
- link: "/assets/icon-set/Icon-external-link-fill.svg",
1610
- chat: "/assets/icon-set/Icon-chat-1-fill.svg",
1611
- community: "/assets/icon-set/Icon-community-fill.svg",
1612
- cpu: "/assets/icon-set/Icon-cpu-fill.svg",
1613
- chevronDown: "/assets/icon-set/Icon-arrow-down-s-fill.svg",
1614
- warning: "/assets/icon-set/Icon-error-warning-fill.svg"
1615
- };
1616
- function ItemWithLogs({ run }) {
1617
- const [isExpanded, setIsExpanded] = useState(false);
1618
- const logSections = run.logs ? [
1619
- {
1620
- title: "Action History",
1621
- items: run.logs.map((log) => ({
1622
- id: log.id,
1623
- text: log.text,
1624
- icon: log.icon,
1625
- iconColor: log.iconColor,
1626
- timestamp: log.timestamp
1627
- }))
1628
- }
1629
- ] : [];
1630
- return /* @__PURE__ */ jsxs(ItemDisclosure, { id: run.id, children: [
1631
- /* @__PURE__ */ jsx(
1632
- ItemHeader,
1633
- {
1634
- slot: "trigger",
1635
- onClick: () => setIsExpanded(!isExpanded),
1636
- $isExpanded: isExpanded,
1637
- children: /* @__PURE__ */ jsxs(ItemContainer, { as: "div", children: [
1638
- /* @__PURE__ */ jsx(ItemIcon, { src: ICONS[run.icon || "bell"], alt: "" }),
1639
- /* @__PURE__ */ jsx(ItemName, { children: run.name }),
1640
- /* @__PURE__ */ jsxs(RunStatus, { $status: run.status, children: [
1641
- run.status === "completed" && "\u2713",
1642
- run.status === "running" && "\u27F3",
1643
- run.status === "failed" && "\u2715"
1644
- ] }),
1645
- /* @__PURE__ */ jsx(ChevronIcon, { $isExpanded: isExpanded, children: /* @__PURE__ */ jsx("img", { src: ICONS.chevronDown, alt: "" }) })
1646
- ] })
1647
- }
1648
- ),
1649
- isExpanded && /* @__PURE__ */ jsx(ItemDisclosurePanel, { children: run.logs && run.logs.length > 0 ? /* @__PURE__ */ jsx(DarkNotificationCard, { sections: logSections }) : /* @__PURE__ */ jsx("div", { style: { color: "#72767D", fontSize: "13px", padding: "8px" }, children: "No action logs available" }) })
1650
- ] });
1651
- }
1652
- function RunsTabContent({
1653
- runs,
1654
- onBrowseAutomations
1655
- }) {
1656
- const [expandedKeys, setExpandedKeys] = useState(
1657
- /* @__PURE__ */ new Set(["scheduled", "completed", "issues"])
1658
- // All sections open by default
1659
- );
1660
- const scheduledRuns = runs.filter((r) => r.category === "scheduled");
1661
- const completedRuns = runs.filter((r) => r.category === "completed");
1662
- const issuesRuns = runs.filter((r) => r.category === "issues");
1663
- const buttonRef = useRef(null);
1664
- const { buttonProps } = useButton(
1665
- {
1666
- onPress: onBrowseAutomations
1667
- },
1668
- buttonRef
1669
- );
1670
- return /* @__PURE__ */ jsxs(RunsContainer, { children: [
1671
- /* @__PURE__ */ jsxs(BrowseButton, { ...buttonProps, ref: buttonRef, children: [
1672
- /* @__PURE__ */ jsx(ItemIcon, { src: ICONS.cpu, alt: "" }),
1673
- /* @__PURE__ */ jsx("span", { children: "Browse Automations" })
1674
- ] }),
1675
- /* @__PURE__ */ jsxs(
1676
- StyledDisclosureGroup,
1677
- {
1678
- expandedKeys,
1679
- onExpandedChange: setExpandedKeys,
1680
- allowsMultipleExpanded: true,
1681
- "aria-label": "Run sections",
1682
- children: [
1683
- /* @__PURE__ */ jsxs(CategoryDisclosure, { id: "scheduled", children: [
1684
- /* @__PURE__ */ jsx(Heading, { level: 3, children: /* @__PURE__ */ jsxs(CategoryHeader, { slot: "trigger", children: [
1685
- /* @__PURE__ */ jsxs(CategoryTitle, { children: [
1686
- /* @__PURE__ */ jsx(HashtagIcon, { src: ICONS.hashtag, alt: "" }),
1687
- /* @__PURE__ */ jsx("span", { children: "SCHEDULED" })
1688
- ] }),
1689
- /* @__PURE__ */ jsx(ChevronIcon, { $isExpanded: expandedKeys.has("scheduled"), children: /* @__PURE__ */ jsx("img", { src: ICONS.chevronDown, alt: "" }) })
1690
- ] }) }),
1691
- /* @__PURE__ */ jsx(CategoryDisclosurePanel, { children: scheduledRuns.length > 0 ? scheduledRuns.map((run) => /* @__PURE__ */ jsx(ItemWithLogs, { run }, run.id)) : /* @__PURE__ */ jsx(ItemContainer, { children: /* @__PURE__ */ jsx(ItemName, { $dimmed: true, children: "No scheduled items" }) }) })
1692
- ] }),
1693
- /* @__PURE__ */ jsxs(CategoryDisclosure, { id: "completed", children: [
1694
- /* @__PURE__ */ jsx(Heading, { level: 3, children: /* @__PURE__ */ jsxs(CategoryHeader, { slot: "trigger", children: [
1695
- /* @__PURE__ */ jsxs(CategoryTitle, { children: [
1696
- /* @__PURE__ */ jsx(HashtagIcon, { src: ICONS.hashtag, alt: "" }),
1697
- /* @__PURE__ */ jsx("span", { children: "COMPLETED" })
1698
- ] }),
1699
- /* @__PURE__ */ jsx(ChevronIcon, { $isExpanded: expandedKeys.has("completed"), children: /* @__PURE__ */ jsx("img", { src: ICONS.chevronDown, alt: "" }) })
1700
- ] }) }),
1701
- /* @__PURE__ */ jsx(CategoryDisclosurePanel, { children: completedRuns.length > 0 ? completedRuns.map((run) => /* @__PURE__ */ jsx(ItemWithLogs, { run }, run.id)) : /* @__PURE__ */ jsx(ItemContainer, { children: /* @__PURE__ */ jsx(ItemName, { $dimmed: true, children: "No completed items" }) }) })
1702
- ] }),
1703
- /* @__PURE__ */ jsxs(CategoryDisclosure, { id: "issues", children: [
1704
- /* @__PURE__ */ jsx(Heading, { level: 3, children: /* @__PURE__ */ jsxs(CategoryHeader, { slot: "trigger", children: [
1705
- /* @__PURE__ */ jsxs(CategoryTitle, { children: [
1706
- /* @__PURE__ */ jsx(HashtagIcon, { src: ICONS.hashtag, alt: "" }),
1707
- /* @__PURE__ */ jsx("span", { children: "ISSUES" })
1708
- ] }),
1709
- /* @__PURE__ */ jsx(ChevronIcon, { $isExpanded: expandedKeys.has("issues"), children: /* @__PURE__ */ jsx("img", { src: ICONS.chevronDown, alt: "" }) })
1710
- ] }) }),
1711
- /* @__PURE__ */ jsx(CategoryDisclosurePanel, { children: issuesRuns.length > 0 ? issuesRuns.map((run) => /* @__PURE__ */ jsx(ItemWithLogs, { run }, run.id)) : /* @__PURE__ */ jsx(ItemContainer, { children: /* @__PURE__ */ jsx(ItemName, { $dimmed: true, children: "No issues" }) }) })
1712
- ] })
1713
- ]
1714
- }
1715
- )
1716
- ] });
1717
- }
1718
- function UsageTabContent({
1719
- currentUsage = 0,
1720
- maxUsage = 1e5
1721
- }) {
1722
- const ref = useRef(null);
1723
- const { meterProps, labelProps } = useMeter({
1724
- label: "Token Usage",
1725
- value: currentUsage,
1726
- minValue: 0,
1727
- maxValue: maxUsage
1728
- });
1729
- const percentage = Math.round(currentUsage / maxUsage * 100);
1730
- let color = "#10b981";
1731
- if (percentage >= 75)
1732
- color = "#ef4444";
1733
- else if (percentage >= 50) color = "#f59e0b";
1734
- return /* @__PURE__ */ jsxs(MeterContainer, { children: [
1735
- /* @__PURE__ */ jsx(MeterLabel, { ...labelProps, children: "Token Usage" }),
1736
- /* @__PURE__ */ jsx(MeterBar, { ...meterProps, ref, children: /* @__PURE__ */ jsx(MeterFill, { $percentage: percentage, $color: color }) }),
1737
- /* @__PURE__ */ jsxs(MeterStats, { children: [
1738
- percentage,
1739
- "% of ",
1740
- maxUsage.toLocaleString(),
1741
- " tokens used",
1742
- /* @__PURE__ */ jsx("br", {}),
1743
- /* @__PURE__ */ jsxs("small", { children: [
1744
- currentUsage.toLocaleString(),
1745
- " / ",
1746
- maxUsage.toLocaleString(),
1747
- " tokens"
1748
- ] })
1749
- ] })
1750
- ] });
1751
- }
1752
- function ConnectionsTabContent({
1753
- isGoogleConnected = false,
1754
- onGoogleConnect,
1755
- onGoogleDisconnect,
1756
- oauthConnections,
1757
- onOAuthConnect,
1758
- onOAuthDisconnect,
1759
- isOAuthConnecting = false,
1760
- isOAuthLoading = false
1761
- }) {
1762
- const ref = useRef(null);
1763
- const useRealOAuthData = oauthConnections && onOAuthConnect && onOAuthDisconnect;
1764
- const googleConnection = useRealOAuthData ? oauthConnections.find((c) => c.provider === "google") : void 0;
1765
- const isConnected = useRealOAuthData ? googleConnection?.connected || false : isGoogleConnected;
1766
- const handlePress = () => {
1767
- if (useRealOAuthData) {
1768
- if (isConnected && googleConnection) {
1769
- onOAuthDisconnect(googleConnection.id);
1770
- } else {
1771
- onOAuthConnect("google");
1772
- }
1773
- } else {
1774
- if (isConnected && onGoogleDisconnect) {
1775
- onGoogleDisconnect();
1776
- } else if (!isConnected && onGoogleConnect) {
1777
- onGoogleConnect();
1778
- }
1779
- }
1780
- };
1781
- const isButtonDisabled = isOAuthLoading || isOAuthConnecting;
1782
- const { buttonProps } = useButton(
1783
- {
1784
- onPress: handlePress,
1785
- isDisabled: isButtonDisabled
1786
- },
1787
- ref
1788
- );
1789
- if (isOAuthLoading) {
1790
- return /* @__PURE__ */ jsx(ConnectionsContainer, { children: /* @__PURE__ */ jsx(ConnectionDescription, { children: "Loading connections..." }) });
1791
- }
1792
- const buttonText = isOAuthConnecting ? "Connecting..." : isConnected ? "\u2713 Disconnect from Google" : "Connect with Google";
1793
- const descriptionText = isConnected ? googleConnection?.displayName ? `Connected as ${googleConnection.displayName}. You can access Google services and data.` : "Your Google account is connected. You can access Google services and data." : "Connect your Google account to access Google services and integrate with your workflows.";
1794
- return /* @__PURE__ */ jsxs(ConnectionsContainer, { children: [
1795
- /* @__PURE__ */ jsx(ConnectionDescription, { children: descriptionText }),
1796
- /* @__PURE__ */ jsx(
1797
- GoogleButton,
1798
- {
1799
- ...buttonProps,
1800
- ref,
1801
- $isConnected: isConnected,
1802
- children: buttonText
1803
- }
1804
- ),
1805
- isConnected && googleConnection?.scopes && googleConnection.scopes.length > 0 && /* @__PURE__ */ jsxs("div", { style: { marginTop: "16px", fontSize: "13px", color: "#B9BBBE" }, children: [
1806
- "Connected services: ",
1807
- googleConnection.scopes.join(", ")
1808
- ] })
1809
- ] });
1810
- }
1811
- function Tab({ item, state }) {
1812
- const ref = useRef(null);
1813
- const { tabProps } = useTab({ key: item.key }, state, ref);
1814
- return /* @__PURE__ */ jsx(TabButton, { ...tabProps, ref, $isSelected: state.selectedKey === item.key, children: item.rendered });
1815
- }
1816
- function TabList({
1817
- state,
1818
- ...props
1819
- }) {
1820
- const ref = useRef(null);
1821
- const { tabListProps } = useTabList(props, state, ref);
1822
- return /* @__PURE__ */ jsx(TabListWrapper, { ...tabListProps, ref, children: [...state.collection].map((item) => /* @__PURE__ */ jsx(Tab, { item, state }, item.key)) });
1823
- }
1824
- function TabPanel({
1825
- state,
1826
- ...props
1827
- }) {
1828
- const ref = useRef(null);
1829
- const { tabPanelProps } = useTabPanel(props, state, ref);
1830
- return /* @__PURE__ */ jsx(TabPanelWrapper, { ...tabPanelProps, ref, children: state.selectedItem?.props.children });
1831
- }
1832
- function PaneMenus({
1833
- activeTab = "runs",
1834
- onTabChange,
1835
- runs = [],
1836
- currentUsage = 0,
1837
- maxUsage = 1e5,
1838
- isGoogleConnected = false,
1839
- onGoogleConnect,
1840
- onGoogleDisconnect,
1841
- oauthConnections,
1842
- onOAuthConnect,
1843
- onOAuthDisconnect,
1844
- isOAuthConnecting = false,
1845
- isOAuthLoading = false,
1846
- onBrowseAutomations
1847
- }) {
1848
- const state = useTabListState({
1849
- defaultSelectedKey: activeTab,
1850
- onSelectionChange: (key) => {
1851
- if (onTabChange) {
1852
- onTabChange(key);
1853
- }
1854
- },
1855
- children: /* @__PURE__ */ jsxs(Fragment, { children: [
1856
- /* @__PURE__ */ jsx(Item, { title: "Runs", children: /* @__PURE__ */ jsx(RunsTabContent, { runs, onBrowseAutomations }) }, "runs"),
1857
- /* @__PURE__ */ jsx(Item, { title: "Usage", children: /* @__PURE__ */ jsx(UsageTabContent, { currentUsage, maxUsage }) }, "usage"),
1858
- /* @__PURE__ */ jsx(Item, { title: "Connections", children: /* @__PURE__ */ jsx(
1859
- ConnectionsTabContent,
1860
- {
1861
- isGoogleConnected,
1862
- onGoogleConnect,
1863
- onGoogleDisconnect,
1864
- oauthConnections,
1865
- onOAuthConnect,
1866
- onOAuthDisconnect,
1867
- isOAuthConnecting,
1868
- isOAuthLoading
1869
- }
1870
- ) }, "connections")
1871
- ] })
1872
- });
1873
- return /* @__PURE__ */ jsxs(Container6, { children: [
1874
- /* @__PURE__ */ jsx(TabList, { state, "aria-label": "Main pane menu" }),
1875
- /* @__PURE__ */ jsx(TabPanel, { state }, state.selectedItem?.key)
1876
- ] });
1877
- }
1878
- var HEADER_BG = "#202225";
1879
- var HEADER_BG_DARK = "#18191c";
1880
- var BUTTON_BG = "#36393f";
1881
- var BUTTON_BG_HOVER = "#40444b";
1882
- var breakpoints = {
1883
- xs: "640px",
1884
- sm: "768px",
1885
- md: "1024px",
1886
- lg: "1280px"
1887
- };
1888
- var Container7 = styled8.header`
1889
- position: relative;
1890
- width: 100%;
1891
- height: 56px;
1892
- background-color: ${HEADER_BG};
1893
- overflow: hidden;
1894
- display: flex;
1895
- align-items: center;
1896
- justify-content: center;
1897
-
1898
- /* Background pattern - responsive sizes */
1899
- &::before {
1900
- content: '';
1901
- position: absolute;
1902
- top: 0;
1903
- left: 0;
1904
- right: 0;
1905
- bottom: 0;
1906
- background-image: url('/assets/bg-set/pattern/Size=xs, Type=Waves Rays2.svg');
1907
- background-size: cover;
1908
- background-position: center;
1909
- background-repeat: no-repeat;
1910
- opacity: 0.6;
1911
- z-index: 0;
1912
- }
1913
-
1914
- /* Small screens */
1915
- @media (min-width: ${breakpoints.xs}) {
1916
- &::before {
1917
- background-image: url('/assets/bg-set/pattern/Size=sm, Type=Waves Rays2.svg');
1918
- }
1919
- }
1920
-
1921
- /* Medium screens */
1922
- @media (min-width: ${breakpoints.sm}) {
1923
- height: 64px;
1924
-
1925
- &::before {
1926
- background-image: url('/assets/bg-set/pattern/Size=md, Type=Waves Rays2.svg');
1927
- }
1928
- }
1929
-
1930
- /* Large screens */
1931
- @media (min-width: ${breakpoints.md}) {
1932
- &::before {
1933
- background-image: url('/assets/bg-set/pattern/Size=lg, Type=Waves Rays2.svg');
1934
- }
1935
- }
1936
-
1937
- /* Extra large screens */
1938
- @media (min-width: ${breakpoints.lg}) {
1939
- &::before {
1940
- background-image: url('/assets/bg-set/pattern/Size=xl, Type=Waves Rays2.svg');
1941
- }
1942
- }
1943
-
1944
- /* Dark theme support */
1945
- @media (prefers-color-scheme: dark) {
1946
- background-color: ${HEADER_BG_DARK};
1947
- }
1948
- `;
1949
- var BrandLogo = styled8.img`
1950
- position: relative;
1951
- z-index: 1;
1952
- max-height: 28px;
1953
- height: auto;
1954
- width: auto;
1955
- object-fit: contain;
1956
- pointer-events: none;
1957
- user-select: none;
1958
-
1959
- /* Slightly larger on desktop */
1960
- @media (min-width: ${breakpoints.sm}) {
1961
- max-height: 32px;
1962
- }
1963
- `;
1964
- var SettingsButton = styled8.button`
1965
- position: absolute;
1966
- top: 50%;
1967
- right: 12px;
1968
- transform: translateY(-50%);
1969
- z-index: 2;
1970
-
1971
- /* Button appearance */
1972
- width: 40px;
1973
- height: 40px;
1974
- border-radius: 50%;
1975
- border: none;
1976
- background-color: ${BUTTON_BG};
1977
- cursor: pointer;
1978
-
1979
- /* Center the icon */
1980
- display: flex;
1981
- align-items: center;
1982
- justify-content: center;
1983
-
1984
- /* Smooth transitions */
1985
- transition: background-color 0.2s ease, transform 0.1s ease;
1986
-
1987
- /* Hover state */
1988
- &:hover {
1989
- background-color: ${BUTTON_BG_HOVER};
1990
- }
1991
-
1992
- /* Active state */
1993
- &:active {
1994
- transform: translateY(-50%) scale(0.95);
1995
- }
1996
-
1997
- /* Focus visible state for accessibility */
1998
- &:focus-visible {
1999
- outline: 2px solid #5865f2;
2000
- outline-offset: 2px;
2001
- }
2002
-
2003
- /* Disabled state */
2004
- &:disabled {
2005
- opacity: 0.5;
2006
- cursor: not-allowed;
2007
- }
2008
-
2009
- /* Responsive positioning */
2010
- @media (min-width: ${breakpoints.sm}) {
2011
- right: 16px;
2012
- }
2013
-
2014
- @media (min-width: ${breakpoints.md}) {
2015
- right: 24px;
2016
- }
2017
- `;
2018
- var BackButton2 = styled8.button`
2019
- position: absolute;
2020
- top: 50%;
2021
- left: 12px;
2022
- transform: translateY(-50%);
2023
- z-index: 2;
2024
-
2025
- /* Button appearance */
2026
- width: 40px;
2027
- height: 40px;
2028
- border-radius: 50%;
2029
- border: none;
2030
- background-color: ${BUTTON_BG};
2031
- cursor: pointer;
2032
-
2033
- /* Center the icon */
2034
- display: flex;
2035
- align-items: center;
2036
- justify-content: center;
2037
-
2038
- /* Smooth transitions */
2039
- transition: background-color 0.2s ease, transform 0.1s ease;
2040
-
2041
- /* Hover state */
2042
- &:hover {
2043
- background-color: ${BUTTON_BG_HOVER};
2044
- }
2045
-
2046
- /* Active state */
2047
- &:active {
2048
- transform: translateY(-50%) scale(0.95);
2049
- }
2050
-
2051
- /* Focus visible state for accessibility */
2052
- &:focus-visible {
2053
- outline: 2px solid #5865f2;
2054
- outline-offset: 2px;
2055
- }
2056
-
2057
- /* Disabled state */
2058
- &:disabled {
2059
- opacity: 0.5;
2060
- cursor: not-allowed;
2061
- }
2062
-
2063
- /* Responsive positioning */
2064
- @media (min-width: ${breakpoints.sm}) {
2065
- left: 16px;
2066
- }
2067
-
2068
- @media (min-width: ${breakpoints.md}) {
2069
- left: 24px;
2070
- }
2071
- `;
2072
- function PaneSectionHeader({
2073
- brand = "Google",
2074
- onBackClick,
2075
- onSettingsClick,
2076
- className,
2077
- "aria-label": ariaLabel = "Pane section header"
2078
- }) {
2079
- const [isBackHovered, setIsBackHovered] = useState(false);
2080
- const [isSettingsHovered, setIsSettingsHovered] = useState(false);
2081
- const backButtonRef = useRef(null);
2082
- const settingsButtonRef = useRef(null);
2083
- const { buttonProps: backButtonProps } = useButton(
2084
- {
2085
- onPress: onBackClick,
2086
- "aria-label": "Go back"
2087
- },
2088
- backButtonRef
2089
- );
2090
- const { buttonProps: settingsButtonProps } = useButton(
2091
- {
2092
- onPress: onSettingsClick,
2093
- "aria-label": "Settings"
2094
- },
2095
- settingsButtonRef
2096
- );
2097
- return /* @__PURE__ */ jsxs(Container7, { className, role: "banner", "aria-label": ariaLabel, children: [
2098
- onBackClick && /* @__PURE__ */ jsx(
2099
- BackButton2,
2100
- {
2101
- ...backButtonProps,
2102
- ref: backButtonRef,
2103
- onMouseEnter: () => setIsBackHovered(true),
2104
- onMouseLeave: () => setIsBackHovered(false),
2105
- $isHovered: isBackHovered,
2106
- children: /* @__PURE__ */ jsx(Icon, { name: "arrow-left-fill", size: 20, color: "#b9bbbe" })
2107
- }
2108
- ),
2109
- /* @__PURE__ */ jsx(BrandLogo, { src: `/assets/bg-set/brand-logos/${brand}2.svg`, alt: brand }),
2110
- /* @__PURE__ */ jsx(
2111
- SettingsButton,
2112
- {
2113
- ...settingsButtonProps,
2114
- ref: settingsButtonRef,
2115
- onMouseEnter: () => setIsSettingsHovered(true),
2116
- onMouseLeave: () => setIsSettingsHovered(false),
2117
- $isHovered: isSettingsHovered,
2118
- children: /* @__PURE__ */ jsx(
2119
- Icon,
2120
- {
2121
- name: isSettingsHovered ? "settings-line" : "settings-fill",
2122
- size: 20,
2123
- color: "#b9bbbe"
2124
- }
2125
- )
2126
- }
2127
- )
2128
- ] });
2129
- }
2130
- PaneSectionHeader.displayName = "PaneSectionHeader";
2131
- var NAV_BG3 = "#36393F";
2132
- var NAV_BG_HOVER = "#40444b";
2133
- var Container8 = styled8.button`
2134
- /* Base button styling */
2135
- width: 48px;
2136
- height: 48px;
2137
- border: none;
2138
- padding: 4px;
2139
- border-radius: ${({ $active }) => $active ? "16px" : "50%"};
2140
- background-color: ${NAV_BG3};
2141
- display: flex;
2142
- align-items: center;
2143
- justify-content: center;
2144
- cursor: pointer;
2145
- transition: all 0.15s ease-out;
2146
- position: relative;
2147
- overflow: hidden;
2148
-
2149
- /* Hover state */
2150
- &:hover {
2151
- border-radius: 16px;
2152
- background-color: ${NAV_BG_HOVER};
2153
- }
2154
-
2155
- /* Focus visible state for accessibility */
2156
- &:focus-visible {
2157
- outline: 2px solid #5865f2;
2158
- outline-offset: 2px;
2159
- }
2160
-
2161
- /* Active indicator */
2162
- ${({ $active }) => $active && `
2163
- &::before {
2164
- content: '';
2165
- position: absolute;
2166
- left: -16px;
2167
- top: 50%;
2168
- transform: translateY(-50%);
2169
- width: 4px;
2170
- height: 40px;
2171
- background-color: #ffffff;
2172
- border-radius: 0 4px 4px 0;
2173
- }
2174
- `}
2175
-
2176
- /* Disabled state */
2177
- &:disabled {
2178
- opacity: 0.5;
2179
- cursor: not-allowed;
2180
- }
2181
- `;
2182
- var LogoImage = styled8.img`
2183
- width: 100%;
2184
- height: 100%;
2185
- object-fit: contain;
2186
- pointer-events: none;
2187
- user-select: none;
2188
- `;
2189
- function ServiceIcon({ brand, active = false, className, ...ariaProps }) {
2190
- const ref = useRef(null);
2191
- const { buttonProps } = useButton(
2192
- {
2193
- ...ariaProps,
2194
- "aria-pressed": active
2195
- },
2196
- ref
2197
- );
2198
- return /* @__PURE__ */ jsx(Container8, { ...buttonProps, ref, $active: active, className, children: /* @__PURE__ */ jsx(LogoImage, { src: `/assets/icons/Brand/${brand}.svg`, alt: brand }) });
2199
- }
2200
- ServiceIcon.displayName = "ServiceIcon";
2201
-
2202
- export { ActionButtons, Icon, IconNames, Layout, NavHorizontal, NavVertical, PaneMenus, PaneSectionHeader, ServiceIcon, WorkflowStatusCard };
2203
- //# sourceMappingURL=chunk-6NGVSBJZ.js.map
2204
- //# sourceMappingURL=chunk-6NGVSBJZ.js.map