@axis-ds/agentic-ui 1.1.0

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 (116) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +31 -0
  3. package/dist/agent-avatar/index.d.mts +22 -0
  4. package/dist/agent-avatar/index.d.ts +22 -0
  5. package/dist/agent-avatar/index.js +112 -0
  6. package/dist/agent-avatar/index.mjs +7 -0
  7. package/dist/approval-card/index.d.mts +31 -0
  8. package/dist/approval-card/index.d.ts +31 -0
  9. package/dist/approval-card/index.js +133 -0
  10. package/dist/approval-card/index.mjs +7 -0
  11. package/dist/attachment-card/index.d.mts +30 -0
  12. package/dist/attachment-card/index.d.ts +30 -0
  13. package/dist/attachment-card/index.js +140 -0
  14. package/dist/attachment-card/index.mjs +7 -0
  15. package/dist/chunk-2BWCQQLU.mjs +136 -0
  16. package/dist/chunk-3TH7GFBD.mjs +83 -0
  17. package/dist/chunk-4PCJFQHQ.mjs +66 -0
  18. package/dist/chunk-657RY6MM.mjs +106 -0
  19. package/dist/chunk-7UGSLEYG.mjs +75 -0
  20. package/dist/chunk-D6GHMPBC.mjs +76 -0
  21. package/dist/chunk-DPENLPBM.mjs +105 -0
  22. package/dist/chunk-DPLGRVNQ.mjs +95 -0
  23. package/dist/chunk-EF4MECAI.mjs +81 -0
  24. package/dist/chunk-ENIWC4WX.mjs +94 -0
  25. package/dist/chunk-ETFET3LT.mjs +72 -0
  26. package/dist/chunk-FAJF5RCY.mjs +115 -0
  27. package/dist/chunk-FPOHPDZ2.mjs +109 -0
  28. package/dist/chunk-FYAMA32G.mjs +50 -0
  29. package/dist/chunk-GQYOOLDL.mjs +63 -0
  30. package/dist/chunk-H6VXOP7U.mjs +86 -0
  31. package/dist/chunk-HLW7VEFF.mjs +47 -0
  32. package/dist/chunk-HWISMHCP.mjs +33 -0
  33. package/dist/chunk-KH4OXDEV.mjs +83 -0
  34. package/dist/chunk-KJVPVBET.mjs +103 -0
  35. package/dist/chunk-LZKOCELQ.mjs +136 -0
  36. package/dist/chunk-MGQ7AEYE.mjs +94 -0
  37. package/dist/chunk-MVBXXDZB.mjs +83 -0
  38. package/dist/chunk-NRBIHROX.mjs +162 -0
  39. package/dist/chunk-O5VXD6C3.mjs +114 -0
  40. package/dist/chunk-O5WFJCWK.mjs +63 -0
  41. package/dist/chunk-OOFM7NNH.mjs +68 -0
  42. package/dist/chunk-PAKLXPHD.mjs +115 -0
  43. package/dist/chunk-PWKN5UHT.mjs +152 -0
  44. package/dist/chunk-RGBY6EEU.mjs +80 -0
  45. package/dist/chunk-RGPKTWK4.mjs +77 -0
  46. package/dist/chunk-S3HVRSN2.mjs +95 -0
  47. package/dist/chunk-SCZ4BQ2G.mjs +68 -0
  48. package/dist/chunk-TCCZL2D5.mjs +51 -0
  49. package/dist/chunk-TKUAT5WE.mjs +105 -0
  50. package/dist/chunk-UG4H7RIP.mjs +77 -0
  51. package/dist/chunk-VKLPWFAI.mjs +79 -0
  52. package/dist/code-block/index.d.mts +24 -0
  53. package/dist/code-block/index.d.ts +24 -0
  54. package/dist/code-block/index.js +114 -0
  55. package/dist/code-block/index.mjs +6 -0
  56. package/dist/context-panel/index.d.mts +32 -0
  57. package/dist/context-panel/index.d.ts +32 -0
  58. package/dist/context-panel/index.js +137 -0
  59. package/dist/context-panel/index.mjs +6 -0
  60. package/dist/diff-viewer/index.d.mts +21 -0
  61. package/dist/diff-viewer/index.d.ts +21 -0
  62. package/dist/diff-viewer/index.js +201 -0
  63. package/dist/diff-viewer/index.mjs +7 -0
  64. package/dist/feedback-buttons/index.d.mts +21 -0
  65. package/dist/feedback-buttons/index.d.ts +21 -0
  66. package/dist/feedback-buttons/index.js +111 -0
  67. package/dist/feedback-buttons/index.mjs +7 -0
  68. package/dist/index.d.mts +20 -0
  69. package/dist/index.d.ts +20 -0
  70. package/dist/index.js +1774 -0
  71. package/dist/index.mjs +75 -0
  72. package/dist/message-bubble/index.d.mts +29 -0
  73. package/dist/message-bubble/index.d.ts +29 -0
  74. package/dist/message-bubble/index.js +135 -0
  75. package/dist/message-bubble/index.mjs +7 -0
  76. package/dist/plan-card/index.d.mts +32 -0
  77. package/dist/plan-card/index.d.ts +32 -0
  78. package/dist/plan-card/index.js +202 -0
  79. package/dist/plan-card/index.mjs +7 -0
  80. package/dist/recovery-banner/index.d.mts +20 -0
  81. package/dist/recovery-banner/index.d.ts +20 -0
  82. package/dist/recovery-banner/index.js +109 -0
  83. package/dist/recovery-banner/index.mjs +6 -0
  84. package/dist/run-progress/index.d.mts +29 -0
  85. package/dist/run-progress/index.d.ts +29 -0
  86. package/dist/run-progress/index.js +179 -0
  87. package/dist/run-progress/index.mjs +7 -0
  88. package/dist/source-panel/index.d.mts +25 -0
  89. package/dist/source-panel/index.d.ts +25 -0
  90. package/dist/source-panel/index.js +135 -0
  91. package/dist/source-panel/index.mjs +7 -0
  92. package/dist/step-timeline/index.d.mts +21 -0
  93. package/dist/step-timeline/index.d.ts +21 -0
  94. package/dist/step-timeline/index.js +110 -0
  95. package/dist/step-timeline/index.mjs +7 -0
  96. package/dist/streaming-text/index.d.mts +27 -0
  97. package/dist/streaming-text/index.d.ts +27 -0
  98. package/dist/streaming-text/index.js +97 -0
  99. package/dist/streaming-text/index.mjs +6 -0
  100. package/dist/surface-renderer/index.d.mts +22 -0
  101. package/dist/surface-renderer/index.d.ts +22 -0
  102. package/dist/surface-renderer/index.js +107 -0
  103. package/dist/surface-renderer/index.mjs +6 -0
  104. package/dist/thinking-indicator/index.d.mts +16 -0
  105. package/dist/thinking-indicator/index.d.ts +16 -0
  106. package/dist/thinking-indicator/index.js +74 -0
  107. package/dist/thinking-indicator/index.mjs +6 -0
  108. package/dist/token-usage-indicator/index.d.mts +22 -0
  109. package/dist/token-usage-indicator/index.d.ts +22 -0
  110. package/dist/token-usage-indicator/index.js +110 -0
  111. package/dist/token-usage-indicator/index.mjs +6 -0
  112. package/dist/tool-call-card/index.d.mts +31 -0
  113. package/dist/tool-call-card/index.d.ts +31 -0
  114. package/dist/tool-call-card/index.js +158 -0
  115. package/dist/tool-call-card/index.mjs +7 -0
  116. package/package.json +130 -0
@@ -0,0 +1,63 @@
1
+ // src/streaming-text/index.tsx
2
+ import * as React from "react";
3
+ import { cn } from "@axis-ds/ui-react";
4
+ import { jsx, jsxs } from "react/jsx-runtime";
5
+ function StreamingText({
6
+ text,
7
+ speed = 20,
8
+ isComplete = false,
9
+ showCursor = true,
10
+ onComplete,
11
+ "aria-live": ariaLive,
12
+ "aria-label": ariaLabel,
13
+ className
14
+ }) {
15
+ const [displayedText, setDisplayedText] = React.useState("");
16
+ const [isStreaming, setIsStreaming] = React.useState(false);
17
+ const prevTextRef = React.useRef("");
18
+ React.useEffect(() => {
19
+ if (isComplete) {
20
+ setDisplayedText(text);
21
+ setIsStreaming(false);
22
+ return;
23
+ }
24
+ if (text.length > prevTextRef.current.length && text.startsWith(prevTextRef.current)) {
25
+ const newText = text.slice(prevTextRef.current.length);
26
+ let charIndex = 0;
27
+ setIsStreaming(true);
28
+ const interval = setInterval(() => {
29
+ if (charIndex < newText.length) {
30
+ setDisplayedText((prev) => prev + newText[charIndex]);
31
+ charIndex++;
32
+ } else {
33
+ clearInterval(interval);
34
+ setIsStreaming(false);
35
+ if (onComplete) onComplete();
36
+ }
37
+ }, speed);
38
+ prevTextRef.current = text;
39
+ return () => clearInterval(interval);
40
+ } else if (text !== prevTextRef.current) {
41
+ setDisplayedText("");
42
+ prevTextRef.current = "";
43
+ }
44
+ }, [text, speed, isComplete, onComplete]);
45
+ return /* @__PURE__ */ jsxs(
46
+ "div",
47
+ {
48
+ role: "region",
49
+ "aria-label": ariaLabel || "AI \uC751\uB2F5",
50
+ "aria-live": ariaLive ?? "polite",
51
+ "aria-busy": isStreaming,
52
+ className: cn("relative", className),
53
+ children: [
54
+ /* @__PURE__ */ jsx("span", { className: "text-[var(--axis-text-primary)] whitespace-pre-wrap", children: displayedText }),
55
+ showCursor && isStreaming && /* @__PURE__ */ jsx("span", { className: "inline-block w-0.5 h-4 ml-0.5 bg-[var(--axis-text-primary)] animate-pulse", "aria-hidden": "true" })
56
+ ]
57
+ }
58
+ );
59
+ }
60
+
61
+ export {
62
+ StreamingText
63
+ };
@@ -0,0 +1,86 @@
1
+ // src/token-usage-indicator/index.tsx
2
+ import { cn } from "@axis-ds/ui-react";
3
+ import { jsx, jsxs } from "react/jsx-runtime";
4
+ function TokenUsageIndicator({
5
+ current,
6
+ max,
7
+ cost,
8
+ warningThreshold = 0.8,
9
+ compact = false,
10
+ className
11
+ }) {
12
+ const ratio = max > 0 ? current / max : 0;
13
+ const percentage = Math.min(Math.round(ratio * 100), 100);
14
+ const getColor = () => {
15
+ if (ratio >= 1) return "bg-[var(--axis-color-red-500)]";
16
+ if (ratio >= warningThreshold) return "bg-[var(--axis-color-yellow-500)]";
17
+ return "bg-[var(--axis-color-green-500)]";
18
+ };
19
+ const getTextColor = () => {
20
+ if (ratio >= 1) return "text-[var(--axis-color-red-500)]";
21
+ if (ratio >= warningThreshold) return "text-[var(--axis-color-yellow-500)]";
22
+ return "text-[var(--axis-text-secondary)]";
23
+ };
24
+ const formatNumber = (n) => n >= 1e3 ? `${(n / 1e3).toFixed(1)}k` : String(n);
25
+ if (compact) {
26
+ return /* @__PURE__ */ jsxs(
27
+ "span",
28
+ {
29
+ role: "meter",
30
+ "aria-valuenow": current,
31
+ "aria-valuemin": 0,
32
+ "aria-valuemax": max,
33
+ "aria-label": `\uD1A0\uD070 \uC0AC\uC6A9\uB7C9: ${current} / ${max}`,
34
+ className: cn("inline-flex items-center gap-1 text-xs", getTextColor(), className),
35
+ children: [
36
+ /* @__PURE__ */ jsx("svg", { className: "w-3 h-3", fill: "none", stroke: "currentColor", viewBox: "0 0 24 24", children: /* @__PURE__ */ jsx("path", { strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: 2, d: "M13 10V3L4 14h7v7l9-11h-7z" }) }),
37
+ formatNumber(current),
38
+ "/",
39
+ formatNumber(max),
40
+ cost !== void 0 && /* @__PURE__ */ jsxs("span", { className: "text-[var(--axis-text-tertiary)]", children: [
41
+ "($",
42
+ cost.toFixed(4),
43
+ ")"
44
+ ] })
45
+ ]
46
+ }
47
+ );
48
+ }
49
+ return /* @__PURE__ */ jsxs(
50
+ "div",
51
+ {
52
+ role: "meter",
53
+ "aria-valuenow": current,
54
+ "aria-valuemin": 0,
55
+ "aria-valuemax": max,
56
+ "aria-label": `\uD1A0\uD070 \uC0AC\uC6A9\uB7C9: ${current} / ${max} (${percentage}%)`,
57
+ className: cn("space-y-1", className),
58
+ children: [
59
+ /* @__PURE__ */ jsxs("div", { className: "flex items-center justify-between text-xs", children: [
60
+ /* @__PURE__ */ jsx("span", { className: "text-[var(--axis-text-secondary)]", children: "\uD1A0\uD070 \uC0AC\uC6A9\uB7C9" }),
61
+ /* @__PURE__ */ jsxs("span", { className: getTextColor(), children: [
62
+ formatNumber(current),
63
+ " / ",
64
+ formatNumber(max)
65
+ ] })
66
+ ] }),
67
+ /* @__PURE__ */ jsx("div", { className: "h-1.5 rounded-full bg-[var(--axis-surface-secondary)] overflow-hidden", children: /* @__PURE__ */ jsx(
68
+ "div",
69
+ {
70
+ className: cn("h-full rounded-full transition-all", getColor()),
71
+ style: { width: `${percentage}%` },
72
+ "aria-hidden": "true"
73
+ }
74
+ ) }),
75
+ cost !== void 0 && /* @__PURE__ */ jsxs("div", { className: "text-xs text-[var(--axis-text-tertiary)] text-right", children: [
76
+ "$",
77
+ cost.toFixed(4)
78
+ ] })
79
+ ]
80
+ }
81
+ );
82
+ }
83
+
84
+ export {
85
+ TokenUsageIndicator
86
+ };
@@ -0,0 +1,47 @@
1
+ // src/thinking-indicator/index.tsx
2
+ import { cn } from "@axis-ds/ui-react";
3
+ import { jsx, jsxs } from "react/jsx-runtime";
4
+ var sizeStyles = {
5
+ sm: "text-xs gap-1",
6
+ md: "text-sm gap-1.5",
7
+ lg: "text-base gap-2"
8
+ };
9
+ var dotSizes = {
10
+ sm: "w-1 h-1",
11
+ md: "w-1.5 h-1.5",
12
+ lg: "w-2 h-2"
13
+ };
14
+ function ThinkingIndicator({
15
+ text = "\uC0DD\uAC01 \uC911",
16
+ size = "md",
17
+ className
18
+ }) {
19
+ return /* @__PURE__ */ jsxs(
20
+ "div",
21
+ {
22
+ className: cn(
23
+ "flex items-center text-[var(--axis-text-secondary)]",
24
+ sizeStyles[size],
25
+ className
26
+ ),
27
+ children: [
28
+ /* @__PURE__ */ jsx("span", { children: text }),
29
+ /* @__PURE__ */ jsx("div", { className: "flex gap-0.5", children: [0, 1, 2].map((i) => /* @__PURE__ */ jsx(
30
+ "div",
31
+ {
32
+ className: cn(
33
+ "rounded-full bg-current animate-bounce",
34
+ dotSizes[size]
35
+ ),
36
+ style: { animationDelay: `${i * 150}ms` }
37
+ },
38
+ i
39
+ )) })
40
+ ]
41
+ }
42
+ );
43
+ }
44
+
45
+ export {
46
+ ThinkingIndicator
47
+ };
@@ -0,0 +1,33 @@
1
+ // src/constants/a11y-labels.ts
2
+ var STATUS_LABELS = {
3
+ pending: "\uB300\uAE30 \uC911",
4
+ running: "\uC2E4\uD589 \uC911",
5
+ complete: "\uC644\uB8CC",
6
+ success: "\uC131\uACF5",
7
+ error: "\uC624\uB958",
8
+ skipped: "\uAC74\uB108\uB700",
9
+ idle: "\uB300\uAE30 \uC911"
10
+ };
11
+ var SEVERITY_LABELS = {
12
+ info: "\uC815\uBCF4",
13
+ warning: "\uC8FC\uC758",
14
+ error: "\uC624\uB958"
15
+ };
16
+ var AGENT_STATUS_LABELS = {
17
+ online: "\uC628\uB77C\uC778",
18
+ busy: "\uC0AC\uC6A9 \uC911",
19
+ offline: "\uC624\uD504\uB77C\uC778"
20
+ };
21
+ var SOURCE_TYPE_LABELS = {
22
+ web: "\uC6F9 \uD398\uC774\uC9C0",
23
+ file: "\uD30C\uC77C",
24
+ database: "\uB370\uC774\uD130\uBCA0\uC774\uC2A4",
25
+ api: "API"
26
+ };
27
+
28
+ export {
29
+ STATUS_LABELS,
30
+ SEVERITY_LABELS,
31
+ AGENT_STATUS_LABELS,
32
+ SOURCE_TYPE_LABELS
33
+ };
@@ -0,0 +1,83 @@
1
+ import {
2
+ AGENT_STATUS_LABELS
3
+ } from "./chunk-SCZ4BQ2G.mjs";
4
+
5
+ // src/agent-avatar/index.tsx
6
+ import { cn } from "@axis-ds/ui-react";
7
+ import { jsx, jsxs } from "react/jsx-runtime";
8
+ var sizeStyles = {
9
+ sm: "w-6 h-6 text-xs",
10
+ md: "w-8 h-8 text-sm",
11
+ lg: "w-10 h-10 text-base",
12
+ xl: "w-12 h-12 text-lg"
13
+ };
14
+ var statusStyles = {
15
+ online: "bg-[var(--axis-color-green-500)]",
16
+ busy: "bg-[var(--axis-color-yellow-500)]",
17
+ offline: "bg-[var(--axis-color-gray-400)]"
18
+ };
19
+ var typeColors = {
20
+ assistant: "bg-[var(--axis-color-purple-500)]",
21
+ tool: "bg-[var(--axis-color-blue-500)]",
22
+ system: "bg-[var(--axis-color-gray-600)]"
23
+ };
24
+ function AgentAvatar({
25
+ name,
26
+ src,
27
+ size = "md",
28
+ status,
29
+ type = "assistant",
30
+ className
31
+ }) {
32
+ const initials = name.split(" ").map((n) => n[0]).join("").slice(0, 2).toUpperCase();
33
+ const statusLabel = status ? AGENT_STATUS_LABELS[status] : "";
34
+ const ariaLabel = `${name}${statusLabel ? `, ${statusLabel}` : ""}`;
35
+ return /* @__PURE__ */ jsxs(
36
+ "div",
37
+ {
38
+ role: "img",
39
+ "aria-label": ariaLabel,
40
+ className: cn("relative inline-flex", className),
41
+ children: [
42
+ src ? /* @__PURE__ */ jsx(
43
+ "img",
44
+ {
45
+ src,
46
+ alt: "",
47
+ "aria-hidden": "true",
48
+ className: cn(
49
+ "rounded-full object-cover",
50
+ sizeStyles[size]
51
+ )
52
+ }
53
+ ) : /* @__PURE__ */ jsx(
54
+ "div",
55
+ {
56
+ "aria-hidden": "true",
57
+ className: cn(
58
+ "rounded-full flex items-center justify-center font-medium text-white",
59
+ sizeStyles[size],
60
+ typeColors[type]
61
+ ),
62
+ children: initials
63
+ }
64
+ ),
65
+ status && /* @__PURE__ */ jsx(
66
+ "span",
67
+ {
68
+ "aria-hidden": "true",
69
+ className: cn(
70
+ "absolute bottom-0 right-0 rounded-full border-2 border-[var(--axis-surface-default)]",
71
+ size === "sm" ? "w-2 h-2" : "w-3 h-3",
72
+ statusStyles[status]
73
+ )
74
+ }
75
+ )
76
+ ]
77
+ }
78
+ );
79
+ }
80
+
81
+ export {
82
+ AgentAvatar
83
+ };
@@ -0,0 +1,103 @@
1
+ // src/context-panel/index.tsx
2
+ import * as React from "react";
3
+ import { cn } from "@axis-ds/ui-react";
4
+ import { Fragment, jsx, jsxs } from "react/jsx-runtime";
5
+ function ContextPanel({
6
+ modelInfo,
7
+ systemPrompt,
8
+ attachedFiles,
9
+ settings,
10
+ collapsible = true,
11
+ defaultExpanded = false,
12
+ className
13
+ }) {
14
+ const [isExpanded, setIsExpanded] = React.useState(defaultExpanded);
15
+ const contentId = React.useId();
16
+ const hasContent = modelInfo || systemPrompt || attachedFiles && attachedFiles.length > 0 || settings && Object.keys(settings).length > 0;
17
+ if (!hasContent) return null;
18
+ const header = /* @__PURE__ */ jsxs("div", { className: "flex items-center gap-2", children: [
19
+ /* @__PURE__ */ jsxs("svg", { className: "w-4 h-4 text-[var(--axis-icon-secondary)]", fill: "none", stroke: "currentColor", viewBox: "0 0 24 24", "aria-hidden": "true", children: [
20
+ /* @__PURE__ */ jsx("path", { strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: 2, d: "M10.325 4.317c.426-1.756 2.924-1.756 3.35 0a1.724 1.724 0 002.573 1.066c1.543-.94 3.31.826 2.37 2.37a1.724 1.724 0 001.066 2.573c1.756.426 1.756 2.924 0 3.35a1.724 1.724 0 00-1.066 2.573c.94 1.543-.826 3.31-2.37 2.37a1.724 1.724 0 00-2.573 1.066c-.426 1.756-2.924 1.756-3.35 0a1.724 1.724 0 00-2.573-1.066c-1.543.94-3.31-.826-2.37-2.37a1.724 1.724 0 00-1.066-2.573c-1.756-.426-1.756-2.924 0-3.35a1.724 1.724 0 001.066-2.573c-.94-1.543.826-3.31 2.37-2.37.996.608 2.296.07 2.572-1.065z" }),
21
+ /* @__PURE__ */ jsx("path", { strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: 2, d: "M15 12a3 3 0 11-6 0 3 3 0 016 0z" })
22
+ ] }),
23
+ /* @__PURE__ */ jsx("span", { className: "text-xs font-medium text-[var(--axis-text-secondary)]", children: "\uCEE8\uD14D\uC2A4\uD2B8" })
24
+ ] });
25
+ const content = /* @__PURE__ */ jsxs("div", { id: contentId, className: "space-y-3 mt-2", children: [
26
+ modelInfo && /* @__PURE__ */ jsxs("div", { children: [
27
+ /* @__PURE__ */ jsx("h5", { className: "text-xs font-medium text-[var(--axis-text-secondary)] mb-1", children: "\uBAA8\uB378" }),
28
+ /* @__PURE__ */ jsxs("div", { className: "flex items-center gap-2", children: [
29
+ /* @__PURE__ */ jsx("code", { className: "text-sm font-mono text-[var(--axis-text-primary)]", children: modelInfo.name }),
30
+ modelInfo.provider && /* @__PURE__ */ jsx("span", { className: "text-xs text-[var(--axis-text-tertiary)]", children: modelInfo.provider }),
31
+ modelInfo.version && /* @__PURE__ */ jsx("span", { className: "text-xs px-1.5 py-0.5 rounded bg-[var(--axis-surface-tertiary)] text-[var(--axis-text-tertiary)]", children: modelInfo.version })
32
+ ] })
33
+ ] }),
34
+ systemPrompt && /* @__PURE__ */ jsxs("div", { children: [
35
+ /* @__PURE__ */ jsx("h5", { className: "text-xs font-medium text-[var(--axis-text-secondary)] mb-1", children: "\uC2DC\uC2A4\uD15C \uD504\uB86C\uD504\uD2B8" }),
36
+ /* @__PURE__ */ jsx("p", { className: "text-xs text-[var(--axis-text-primary)] p-2 rounded bg-[var(--axis-surface-secondary)] line-clamp-3 whitespace-pre-wrap", children: systemPrompt })
37
+ ] }),
38
+ attachedFiles && attachedFiles.length > 0 && /* @__PURE__ */ jsxs("div", { children: [
39
+ /* @__PURE__ */ jsxs("h5", { className: "text-xs font-medium text-[var(--axis-text-secondary)] mb-1", children: [
40
+ "\uCCA8\uBD80 \uD30C\uC77C (",
41
+ attachedFiles.length,
42
+ ")"
43
+ ] }),
44
+ /* @__PURE__ */ jsx("div", { className: "space-y-1", children: attachedFiles.map((file, i) => /* @__PURE__ */ jsxs("div", { className: "flex items-center gap-1.5 text-xs text-[var(--axis-text-primary)]", children: [
45
+ /* @__PURE__ */ jsx("svg", { className: "w-3 h-3 text-[var(--axis-icon-secondary)]", fill: "none", stroke: "currentColor", viewBox: "0 0 24 24", "aria-hidden": "true", children: /* @__PURE__ */ jsx("path", { strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: 2, d: "M15.172 7l-6.586 6.586a2 2 0 102.828 2.828l6.414-6.586a4 4 0 00-5.656-5.656l-6.415 6.585a6 6 0 108.486 8.486L20.5 13" }) }),
46
+ /* @__PURE__ */ jsx("span", { className: "truncate", children: file })
47
+ ] }, i)) })
48
+ ] }),
49
+ settings && Object.keys(settings).length > 0 && /* @__PURE__ */ jsxs("div", { children: [
50
+ /* @__PURE__ */ jsx("h5", { className: "text-xs font-medium text-[var(--axis-text-secondary)] mb-1", children: "\uC124\uC815" }),
51
+ /* @__PURE__ */ jsx("div", { className: "space-y-1", children: Object.entries(settings).map(([key, value]) => /* @__PURE__ */ jsxs("div", { className: "flex items-center justify-between text-xs", children: [
52
+ /* @__PURE__ */ jsx("span", { className: "text-[var(--axis-text-secondary)]", children: key }),
53
+ /* @__PURE__ */ jsx("code", { className: "font-mono text-[var(--axis-text-primary)]", children: value })
54
+ ] }, key)) })
55
+ ] })
56
+ ] });
57
+ return /* @__PURE__ */ jsx(
58
+ "div",
59
+ {
60
+ className: cn(
61
+ "rounded-lg border p-3",
62
+ "bg-[var(--axis-surface-secondary)] border-[var(--axis-border-default)]",
63
+ className
64
+ ),
65
+ children: collapsible ? /* @__PURE__ */ jsxs(Fragment, { children: [
66
+ /* @__PURE__ */ jsxs(
67
+ "button",
68
+ {
69
+ onClick: () => setIsExpanded(!isExpanded),
70
+ "aria-expanded": isExpanded,
71
+ "aria-controls": contentId,
72
+ className: "w-full flex items-center justify-between hover:opacity-80 transition-opacity",
73
+ children: [
74
+ header,
75
+ /* @__PURE__ */ jsx(
76
+ "svg",
77
+ {
78
+ className: cn(
79
+ "w-4 h-4 text-[var(--axis-text-secondary)] transition-transform",
80
+ isExpanded && "rotate-180"
81
+ ),
82
+ fill: "none",
83
+ stroke: "currentColor",
84
+ viewBox: "0 0 24 24",
85
+ "aria-hidden": "true",
86
+ children: /* @__PURE__ */ jsx("path", { strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: 2, d: "M19 9l-7 7-7-7" })
87
+ }
88
+ )
89
+ ]
90
+ }
91
+ ),
92
+ isExpanded && content
93
+ ] }) : /* @__PURE__ */ jsxs(Fragment, { children: [
94
+ header,
95
+ content
96
+ ] })
97
+ }
98
+ );
99
+ }
100
+
101
+ export {
102
+ ContextPanel
103
+ };
@@ -0,0 +1,136 @@
1
+ import {
2
+ STATUS_LABELS
3
+ } from "./chunk-SCZ4BQ2G.mjs";
4
+
5
+ // src/run-progress/index.tsx
6
+ import * as React from "react";
7
+ import { cn } from "@axis-ds/ui-react";
8
+ import { jsx, jsxs } from "react/jsx-runtime";
9
+ var statusColors = {
10
+ pending: "bg-[var(--axis-color-gray-300)]",
11
+ running: "bg-[var(--axis-color-blue-500)] animate-pulse",
12
+ complete: "bg-[var(--axis-color-green-500)]",
13
+ error: "bg-[var(--axis-color-red-500)]"
14
+ };
15
+ var statusIcons = {
16
+ pending: null,
17
+ running: /* @__PURE__ */ jsxs("svg", { className: "w-3 h-3 animate-spin", viewBox: "0 0 24 24", fill: "none", children: [
18
+ /* @__PURE__ */ jsx("circle", { className: "opacity-25", cx: "12", cy: "12", r: "10", stroke: "currentColor", strokeWidth: "4" }),
19
+ /* @__PURE__ */ jsx("path", { className: "opacity-75", fill: "currentColor", d: "M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4z" })
20
+ ] }),
21
+ complete: /* @__PURE__ */ jsx("svg", { className: "w-3 h-3", fill: "none", stroke: "currentColor", viewBox: "0 0 24 24", children: /* @__PURE__ */ jsx("path", { strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: 2, d: "M5 13l4 4L19 7" }) }),
22
+ error: /* @__PURE__ */ jsx("svg", { className: "w-3 h-3", fill: "none", stroke: "currentColor", viewBox: "0 0 24 24", children: /* @__PURE__ */ jsx("path", { strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: 2, d: "M6 18L18 6M6 6l12 12" }) })
23
+ };
24
+ function RunProgress({
25
+ status,
26
+ steps,
27
+ currentStep,
28
+ onCancel,
29
+ onRetry,
30
+ className
31
+ }) {
32
+ const progressPercent = React.useMemo(() => {
33
+ const completed = steps.filter((s) => s.status === "complete").length;
34
+ return Math.round(completed / steps.length * 100);
35
+ }, [steps]);
36
+ return /* @__PURE__ */ jsxs(
37
+ "div",
38
+ {
39
+ className: cn(
40
+ "rounded-lg border p-4",
41
+ "bg-[var(--axis-surface-default)] border-[var(--axis-border-default)]",
42
+ className
43
+ ),
44
+ children: [
45
+ /* @__PURE__ */ jsxs("div", { className: "flex items-center justify-between mb-4", children: [
46
+ /* @__PURE__ */ jsxs("div", { className: "flex items-center gap-2", children: [
47
+ status === "running" && /* @__PURE__ */ jsx("div", { className: "w-2 h-2 rounded-full bg-[var(--axis-color-blue-500)] animate-pulse" }),
48
+ /* @__PURE__ */ jsxs("span", { className: "text-sm font-medium text-[var(--axis-text-primary)]", children: [
49
+ status === "idle" && "\uB300\uAE30 \uC911",
50
+ status === "running" && "\uC2E4\uD589 \uC911",
51
+ status === "complete" && "\uC644\uB8CC",
52
+ status === "error" && "\uC624\uB958 \uBC1C\uC0DD"
53
+ ] })
54
+ ] }),
55
+ /* @__PURE__ */ jsxs("span", { className: "text-xs text-[var(--axis-text-secondary)]", children: [
56
+ progressPercent,
57
+ "%"
58
+ ] })
59
+ ] }),
60
+ /* @__PURE__ */ jsx(
61
+ "div",
62
+ {
63
+ role: "progressbar",
64
+ "aria-valuenow": progressPercent,
65
+ "aria-valuemin": 0,
66
+ "aria-valuemax": 100,
67
+ "aria-label": `\uC2E4\uD589 \uC9C4\uD589\uB960 ${progressPercent}%`,
68
+ className: "w-full h-1.5 rounded-full bg-[var(--axis-surface-secondary)] mb-4",
69
+ children: /* @__PURE__ */ jsx(
70
+ "div",
71
+ {
72
+ className: "h-full rounded-full bg-[var(--axis-color-blue-500)] transition-all duration-300",
73
+ style: { width: `${progressPercent}%` }
74
+ }
75
+ )
76
+ }
77
+ ),
78
+ /* @__PURE__ */ jsx("div", { role: "list", "aria-label": "\uC2E4\uD589 \uB2E8\uACC4", className: "space-y-2", children: steps.map((step, index) => /* @__PURE__ */ jsxs(
79
+ "div",
80
+ {
81
+ role: "listitem",
82
+ "aria-current": currentStep === index ? "step" : void 0,
83
+ className: cn(
84
+ "flex items-center gap-3 p-2 rounded-md transition-colors",
85
+ currentStep === index && "bg-[var(--axis-surface-secondary)]"
86
+ ),
87
+ children: [
88
+ /* @__PURE__ */ jsx(
89
+ "div",
90
+ {
91
+ className: cn(
92
+ "w-5 h-5 rounded-full flex items-center justify-center text-white text-xs",
93
+ statusColors[step.status]
94
+ ),
95
+ "aria-hidden": "true",
96
+ children: statusIcons[step.status] || index + 1
97
+ }
98
+ ),
99
+ /* @__PURE__ */ jsxs("div", { className: "flex-1 min-w-0", children: [
100
+ /* @__PURE__ */ jsxs("span", { className: "sr-only", children: [
101
+ STATUS_LABELS[step.status],
102
+ ":"
103
+ ] }),
104
+ /* @__PURE__ */ jsx("p", { className: "text-sm font-medium text-[var(--axis-text-primary)] truncate", children: step.label }),
105
+ step.description && /* @__PURE__ */ jsx("p", { className: "text-xs text-[var(--axis-text-secondary)] truncate", children: step.description })
106
+ ] })
107
+ ]
108
+ },
109
+ step.id
110
+ )) }),
111
+ (onCancel || onRetry) && /* @__PURE__ */ jsxs("div", { className: "flex justify-end gap-2 mt-4 pt-4 border-t border-[var(--axis-border-default)]", children: [
112
+ status === "running" && onCancel && /* @__PURE__ */ jsx(
113
+ "button",
114
+ {
115
+ onClick: onCancel,
116
+ className: "px-3 py-1.5 text-sm rounded-md bg-[var(--axis-surface-secondary)] text-[var(--axis-text-primary)] hover:bg-[var(--axis-surface-tertiary)]",
117
+ children: "\uCDE8\uC18C"
118
+ }
119
+ ),
120
+ status === "error" && onRetry && /* @__PURE__ */ jsx(
121
+ "button",
122
+ {
123
+ onClick: onRetry,
124
+ className: "px-3 py-1.5 text-sm rounded-md bg-[var(--axis-color-blue-500)] text-white hover:bg-[var(--axis-color-blue-600)]",
125
+ children: "\uC7AC\uC2DC\uB3C4"
126
+ }
127
+ )
128
+ ] })
129
+ ]
130
+ }
131
+ );
132
+ }
133
+
134
+ export {
135
+ RunProgress
136
+ };
@@ -0,0 +1,94 @@
1
+ import {
2
+ SEVERITY_LABELS
3
+ } from "./chunk-HWISMHCP.mjs";
4
+
5
+ // src/approval-card/index.tsx
6
+ import * as React from "react";
7
+ import { cn } from "@axis-ds/ui-react";
8
+ import { jsx, jsxs } from "react/jsx-runtime";
9
+ var severityStyles = {
10
+ info: {
11
+ border: "border-l-[var(--axis-color-blue-500)]",
12
+ icon: "text-[var(--axis-color-blue-500)]",
13
+ bg: "bg-[var(--axis-surface-info)]"
14
+ },
15
+ warning: {
16
+ border: "border-l-[var(--axis-color-yellow-500)]",
17
+ icon: "text-[var(--axis-color-yellow-500)]",
18
+ bg: "bg-[var(--axis-surface-warning)]"
19
+ },
20
+ error: {
21
+ border: "border-l-[var(--axis-color-red-500)]",
22
+ icon: "text-[var(--axis-color-red-500)]",
23
+ bg: "bg-[var(--axis-surface-error)]"
24
+ }
25
+ };
26
+ var severityIcons = {
27
+ info: /* @__PURE__ */ jsx("svg", { className: "w-5 h-5", fill: "none", stroke: "currentColor", viewBox: "0 0 24 24", children: /* @__PURE__ */ jsx("path", { strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: 2, d: "M13 16h-1v-4h-1m1-4h.01M21 12a9 9 0 11-18 0 9 9 0 0118 0z" }) }),
28
+ warning: /* @__PURE__ */ jsx("svg", { className: "w-5 h-5", fill: "none", stroke: "currentColor", viewBox: "0 0 24 24", children: /* @__PURE__ */ jsx("path", { strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: 2, d: "M12 9v2m0 4h.01m-6.938 4h13.856c1.54 0 2.502-1.667 1.732-3L13.732 4c-.77-1.333-2.694-1.333-3.464 0L3.34 16c-.77 1.333.192 3 1.732 3z" }) }),
29
+ error: /* @__PURE__ */ jsx("svg", { className: "w-5 h-5", fill: "none", stroke: "currentColor", viewBox: "0 0 24 24", children: /* @__PURE__ */ jsx("path", { strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: 2, d: "M12 8v4m0 4h.01M21 12a9 9 0 11-18 0 9 9 0 0118 0z" }) })
30
+ };
31
+ var actionVariantStyles = {
32
+ default: "bg-[var(--axis-button-bg-default)] text-white hover:bg-[var(--axis-button-bg-hover)]",
33
+ secondary: "bg-[var(--axis-button-secondary-bg-default)] text-[var(--axis-text-primary)] hover:bg-[var(--axis-button-secondary-bg-hover)]",
34
+ ghost: "bg-transparent text-[var(--axis-text-primary)] hover:bg-[var(--axis-surface-secondary)]",
35
+ destructive: "bg-[var(--axis-button-destructive-bg-default)] text-white hover:bg-[var(--axis-button-destructive-bg-hover)]"
36
+ };
37
+ function ApprovalCard({
38
+ id,
39
+ title,
40
+ description,
41
+ severity = "info",
42
+ actions,
43
+ children,
44
+ className
45
+ }) {
46
+ const styles = severityStyles[severity];
47
+ const generatedId = React.useId();
48
+ const baseId = id || generatedId;
49
+ const titleId = `${baseId}-title`;
50
+ const descId = `${baseId}-desc`;
51
+ const severityLabel = SEVERITY_LABELS[severity];
52
+ return /* @__PURE__ */ jsx(
53
+ "div",
54
+ {
55
+ role: "region",
56
+ "aria-labelledby": titleId,
57
+ "aria-describedby": description ? descId : void 0,
58
+ className: cn(
59
+ "rounded-lg border border-l-4 p-4",
60
+ "bg-[var(--axis-surface-default)] border-[var(--axis-border-default)]",
61
+ styles.border,
62
+ className
63
+ ),
64
+ children: /* @__PURE__ */ jsxs("div", { className: "flex items-start gap-3", children: [
65
+ /* @__PURE__ */ jsx("div", { className: cn("flex-shrink-0 mt-0.5", styles.icon), "aria-hidden": "true", children: severityIcons[severity] }),
66
+ /* @__PURE__ */ jsxs("div", { className: "flex-1 min-w-0", children: [
67
+ /* @__PURE__ */ jsxs("span", { className: "sr-only", children: [
68
+ severityLabel,
69
+ " \uC54C\uB9BC:"
70
+ ] }),
71
+ /* @__PURE__ */ jsx("h4", { id: titleId, className: "text-sm font-semibold text-[var(--axis-text-primary)]", children: title }),
72
+ description && /* @__PURE__ */ jsx("p", { id: descId, className: "mt-1 text-sm text-[var(--axis-text-secondary)]", children: description }),
73
+ children && /* @__PURE__ */ jsx("div", { className: "mt-3", children }),
74
+ /* @__PURE__ */ jsx("div", { className: "flex flex-wrap gap-2 mt-4", children: actions.map((action, index) => /* @__PURE__ */ jsx(
75
+ "button",
76
+ {
77
+ onClick: action.onClick,
78
+ className: cn(
79
+ "px-3 py-1.5 text-sm font-medium rounded-md transition-colors",
80
+ actionVariantStyles[action.variant || "default"]
81
+ ),
82
+ children: action.label
83
+ },
84
+ index
85
+ )) })
86
+ ] })
87
+ ] })
88
+ }
89
+ );
90
+ }
91
+
92
+ export {
93
+ ApprovalCard
94
+ };