@progress/kendo-themes-html 14.4.0-dev.2 → 14.4.0-dev.4

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 (176) hide show
  1. package/dist/cjs/agent-response/agent-step.js +1 -0
  2. package/dist/cjs/agent-response/chain-of-thought.spec.js +1 -0
  3. package/dist/cjs/agent-response/reasoning.spec.js +1 -0
  4. package/dist/cjs/agent-response/templates/chain-of-thought-expanded.js +1 -0
  5. package/dist/cjs/agent-response/templates/chain-of-thought-normal.js +1 -0
  6. package/dist/cjs/agent-response/templates/reasoning-expanded.js +1 -0
  7. package/dist/cjs/agent-response/templates/reasoning-normal.js +1 -0
  8. package/dist/cjs/agent-response/templates/tool-call-expanded.js +1 -0
  9. package/dist/cjs/agent-response/templates/tool-call-normal.js +1 -0
  10. package/dist/cjs/agent-response/thought.spec.js +1 -0
  11. package/dist/cjs/agent-response/tool-call.spec.js +1 -0
  12. package/dist/cjs/checkpoint/checkpoint.spec.js +1 -0
  13. package/dist/cjs/checkpoint/templates/checkpoint-normal.js +1 -0
  14. package/dist/cjs/citation/citation-popover.spec.js +1 -0
  15. package/dist/cjs/citation/citation.spec.js +1 -0
  16. package/dist/cjs/citation/templates/citation-normal.js +1 -0
  17. package/dist/cjs/citation/templates/citation-opened.js +1 -0
  18. package/dist/cjs/datetime-selector/datetime-selector.spec.js +1 -1
  19. package/dist/cjs/datetimepicker/datetimepicker.spec.js +1 -1
  20. package/dist/cjs/datetimepicker/demos/datetimepicker.js +1 -1
  21. package/dist/cjs/datetimepicker/templates/datetimepicker-adaptive.js +1 -1
  22. package/dist/cjs/datetimepicker/templates/datetimepicker-disabled.js +1 -1
  23. package/dist/cjs/datetimepicker/templates/datetimepicker-invalid.js +1 -1
  24. package/dist/cjs/datetimepicker/templates/datetimepicker-normal.js +1 -1
  25. package/dist/cjs/datetimepicker/templates/datetimepicker-popup.js +1 -1
  26. package/dist/cjs/gantt/demos/gantt.js +1 -1
  27. package/dist/cjs/gantt/templates/gantt-normal.js +1 -1
  28. package/dist/cjs/gantt/templates/gantt-row-reordering.js +1 -1
  29. package/dist/cjs/gantt/templates/gantt-with-tooltip.js +1 -1
  30. package/dist/cjs/imageeditor/templates/imageeditor-crop.js +1 -1
  31. package/dist/cjs/imageeditor/templates/imageeditor-normal.js +1 -1
  32. package/dist/cjs/imageeditor/templates/imageeditor-resize.js +1 -1
  33. package/dist/cjs/index.js +8 -8
  34. package/dist/cjs/popover/popover.spec.js +1 -1
  35. package/dist/cjs/scheduler/demos/scheduler.js +1 -1
  36. package/dist/cjs/scheduler/scheduler-toolbar.spec.js +1 -1
  37. package/dist/cjs/scheduler/templates/scheduler-agenda.js +1 -1
  38. package/dist/cjs/scheduler/templates/scheduler-day.js +1 -1
  39. package/dist/cjs/scheduler/templates/scheduler-flex-agenda.js +1 -1
  40. package/dist/cjs/scheduler/templates/scheduler-flex-day.js +1 -1
  41. package/dist/cjs/scheduler/templates/scheduler-flex-horizontal-grouping.js +1 -1
  42. package/dist/cjs/scheduler/templates/scheduler-flex-month.js +1 -1
  43. package/dist/cjs/scheduler/templates/scheduler-flex-timeline.js +1 -1
  44. package/dist/cjs/scheduler/templates/scheduler-flex-vertical-grouping.js +1 -1
  45. package/dist/cjs/scheduler/templates/scheduler-flex-week.js +1 -1
  46. package/dist/cjs/scheduler/templates/scheduler-flex-year.js +1 -1
  47. package/dist/cjs/scheduler/templates/scheduler-horizontal-grouping.js +1 -1
  48. package/dist/cjs/scheduler/templates/scheduler-month.js +1 -1
  49. package/dist/cjs/scheduler/templates/scheduler-timeline.js +1 -1
  50. package/dist/cjs/scheduler/templates/scheduler-vertical-grouping.js +1 -1
  51. package/dist/cjs/scheduler/templates/scheduler-week.js +1 -1
  52. package/dist/cjs/segmented-control/segmented-control-button.spec.js +1 -1
  53. package/dist/cjs/segmented-control/templates/segmented-control-disabled.js +1 -1
  54. package/dist/cjs/segmented-control/templates/segmented-control-icons.js +1 -1
  55. package/dist/cjs/segmented-control/templates/segmented-control-normal.js +1 -1
  56. package/dist/cjs/segmented-control/templates/segmented-control-stretched.js +1 -1
  57. package/dist/cjs/segmented-control/templates/segmented-control-text.js +1 -1
  58. package/dist/esm/agent-response/agent-step.mjs +1 -0
  59. package/dist/esm/agent-response/chain-of-thought.spec.mjs +1 -0
  60. package/dist/esm/agent-response/reasoning.spec.mjs +1 -0
  61. package/dist/esm/agent-response/templates/chain-of-thought-expanded.mjs +1 -0
  62. package/dist/esm/agent-response/templates/chain-of-thought-normal.mjs +1 -0
  63. package/dist/esm/agent-response/templates/reasoning-expanded.mjs +1 -0
  64. package/dist/esm/agent-response/templates/reasoning-normal.mjs +1 -0
  65. package/dist/esm/agent-response/templates/tool-call-expanded.mjs +1 -0
  66. package/dist/esm/agent-response/templates/tool-call-normal.mjs +1 -0
  67. package/dist/esm/agent-response/thought.spec.mjs +1 -0
  68. package/dist/esm/agent-response/tool-call.spec.mjs +1 -0
  69. package/dist/esm/checkpoint/checkpoint.spec.mjs +1 -0
  70. package/dist/esm/checkpoint/templates/checkpoint-normal.mjs +1 -0
  71. package/dist/esm/citation/citation-popover.spec.mjs +1 -0
  72. package/dist/esm/citation/citation.spec.mjs +1 -0
  73. package/dist/esm/citation/templates/citation-normal.mjs +1 -0
  74. package/dist/esm/citation/templates/citation-opened.mjs +1 -0
  75. package/dist/esm/datetime-selector/datetime-selector.spec.mjs +1 -1
  76. package/dist/esm/datetimepicker/datetimepicker.spec.mjs +1 -1
  77. package/dist/esm/datetimepicker/demos/datetimepicker.mjs +1 -1
  78. package/dist/esm/datetimepicker/templates/datetimepicker-adaptive.mjs +1 -1
  79. package/dist/esm/datetimepicker/templates/datetimepicker-disabled.mjs +1 -1
  80. package/dist/esm/datetimepicker/templates/datetimepicker-invalid.mjs +1 -1
  81. package/dist/esm/datetimepicker/templates/datetimepicker-normal.mjs +1 -1
  82. package/dist/esm/datetimepicker/templates/datetimepicker-popup.mjs +1 -1
  83. package/dist/esm/gantt/demos/gantt.mjs +1 -1
  84. package/dist/esm/gantt/templates/gantt-normal.mjs +1 -1
  85. package/dist/esm/gantt/templates/gantt-row-reordering.mjs +1 -1
  86. package/dist/esm/gantt/templates/gantt-with-tooltip.mjs +1 -1
  87. package/dist/esm/imageeditor/templates/imageeditor-crop.mjs +1 -1
  88. package/dist/esm/imageeditor/templates/imageeditor-normal.mjs +1 -1
  89. package/dist/esm/imageeditor/templates/imageeditor-resize.mjs +1 -1
  90. package/dist/esm/index.mjs +8 -8
  91. package/dist/esm/popover/demos/popover.mjs +1 -1
  92. package/dist/esm/popover/popover.spec.mjs +1 -1
  93. package/dist/esm/popover/templates/popover-normal.mjs +1 -1
  94. package/dist/esm/scheduler/demos/scheduler.mjs +1 -1
  95. package/dist/esm/scheduler/scheduler-toolbar.spec.mjs +1 -1
  96. package/dist/esm/scheduler/templates/scheduler-agenda.mjs +1 -1
  97. package/dist/esm/scheduler/templates/scheduler-day.mjs +1 -1
  98. package/dist/esm/scheduler/templates/scheduler-flex-agenda.mjs +1 -1
  99. package/dist/esm/scheduler/templates/scheduler-flex-day.mjs +1 -1
  100. package/dist/esm/scheduler/templates/scheduler-flex-horizontal-grouping.mjs +1 -1
  101. package/dist/esm/scheduler/templates/scheduler-flex-month.mjs +1 -1
  102. package/dist/esm/scheduler/templates/scheduler-flex-timeline.mjs +1 -1
  103. package/dist/esm/scheduler/templates/scheduler-flex-vertical-grouping.mjs +1 -1
  104. package/dist/esm/scheduler/templates/scheduler-flex-week.mjs +1 -1
  105. package/dist/esm/scheduler/templates/scheduler-flex-year.mjs +1 -1
  106. package/dist/esm/scheduler/templates/scheduler-horizontal-grouping.mjs +1 -1
  107. package/dist/esm/scheduler/templates/scheduler-month.mjs +1 -1
  108. package/dist/esm/scheduler/templates/scheduler-timeline.mjs +1 -1
  109. package/dist/esm/scheduler/templates/scheduler-vertical-grouping.mjs +1 -1
  110. package/dist/esm/scheduler/templates/scheduler-week.mjs +1 -1
  111. package/dist/esm/segmented-control/segmented-control-button.spec.mjs +1 -1
  112. package/dist/esm/segmented-control/templates/segmented-control-disabled.mjs +1 -1
  113. package/dist/esm/segmented-control/templates/segmented-control-icons.mjs +1 -1
  114. package/dist/esm/segmented-control/templates/segmented-control-normal.mjs +1 -1
  115. package/dist/esm/segmented-control/templates/segmented-control-stretched.mjs +1 -1
  116. package/dist/esm/segmented-control/templates/segmented-control-text.mjs +1 -1
  117. package/dist/types/agent-response/agent-step.d.ts +48 -0
  118. package/dist/types/agent-response/chain-of-thought.spec.d.ts +20 -0
  119. package/dist/types/agent-response/constants.d.ts +2 -0
  120. package/dist/types/agent-response/index.d.ts +10 -0
  121. package/dist/types/agent-response/reasoning.spec.d.ts +20 -0
  122. package/dist/types/agent-response/templates/chain-of-thought-expanded.d.ts +1 -0
  123. package/dist/types/agent-response/templates/chain-of-thought-normal.d.ts +1 -0
  124. package/dist/types/agent-response/templates/reasoning-expanded.d.ts +1 -0
  125. package/dist/types/agent-response/templates/reasoning-normal.d.ts +1 -0
  126. package/dist/types/agent-response/templates/tool-call-expanded.d.ts +1 -0
  127. package/dist/types/agent-response/templates/tool-call-normal.d.ts +1 -0
  128. package/dist/types/agent-response/thought.spec.d.ts +33 -0
  129. package/dist/types/agent-response/tool-call.spec.d.ts +21 -0
  130. package/dist/types/checkpoint/checkpoint.spec.d.ts +18 -0
  131. package/dist/types/checkpoint/constants.d.ts +2 -0
  132. package/dist/types/checkpoint/index.d.ts +2 -0
  133. package/dist/types/checkpoint/templates/checkpoint-normal.d.ts +1 -0
  134. package/dist/types/citation/citation-popover.spec.d.ts +22 -0
  135. package/dist/types/citation/citation.spec.d.ts +16 -0
  136. package/dist/types/citation/constants.d.ts +2 -0
  137. package/dist/types/citation/index.d.ts +4 -0
  138. package/dist/types/citation/templates/citation-normal.d.ts +1 -0
  139. package/dist/types/citation/templates/citation-opened.d.ts +1 -0
  140. package/dist/types/index.d.ts +3 -0
  141. package/dist/types/popover/popover.spec.d.ts +2 -2
  142. package/dist/types/segmented-control/segmented-control-button.spec.d.ts +1 -0
  143. package/dist/types/segmented-control/segmented-control.spec.d.ts +5 -3
  144. package/package.json +2 -2
  145. package/src/agent-response/agent-step.tsx +113 -0
  146. package/src/agent-response/chain-of-thought.spec.tsx +45 -0
  147. package/src/agent-response/constants.ts +2 -0
  148. package/src/agent-response/index.ts +10 -0
  149. package/src/agent-response/reasoning.spec.tsx +46 -0
  150. package/src/agent-response/templates/chain-of-thought-expanded.tsx +9 -0
  151. package/src/agent-response/templates/chain-of-thought-normal.tsx +3 -0
  152. package/src/agent-response/templates/reasoning-expanded.tsx +7 -0
  153. package/src/agent-response/templates/reasoning-normal.tsx +3 -0
  154. package/src/agent-response/templates/tool-call-expanded.tsx +15 -0
  155. package/src/agent-response/templates/tool-call-normal.tsx +3 -0
  156. package/src/agent-response/tests/chain-of-thought.tsx +46 -0
  157. package/src/agent-response/tests/reasoning.tsx +21 -0
  158. package/src/agent-response/tests/tool-call.tsx +69 -0
  159. package/src/agent-response/thought.spec.tsx +96 -0
  160. package/src/agent-response/tool-call.spec.tsx +46 -0
  161. package/src/checkpoint/checkpoint.spec.tsx +52 -0
  162. package/src/checkpoint/constants.ts +2 -0
  163. package/src/checkpoint/index.ts +2 -0
  164. package/src/checkpoint/templates/checkpoint-normal.tsx +8 -0
  165. package/src/checkpoint/tests/checkpoint.tsx +42 -0
  166. package/src/citation/citation-popover.spec.tsx +71 -0
  167. package/src/citation/citation.spec.tsx +45 -0
  168. package/src/citation/constants.ts +2 -0
  169. package/src/citation/index.ts +4 -0
  170. package/src/citation/templates/citation-normal.tsx +3 -0
  171. package/src/citation/templates/citation-opened.tsx +20 -0
  172. package/src/citation/tests/citation.tsx +53 -0
  173. package/src/index.ts +3 -0
  174. package/src/popover/popover.spec.tsx +3 -3
  175. package/src/segmented-control/segmented-control-button.spec.tsx +2 -0
  176. package/src/segmented-control/segmented-control.spec.tsx +5 -3
@@ -0,0 +1,113 @@
1
+ import * as React from "react";
2
+ import { classNames } from "../misc";
3
+ import { Icon } from "../icon";
4
+ import { Badge } from "../badge";
5
+ import { KendoComponent, KendoBaseProps } from "../_types/component";
6
+ import { AGENT_RESPONSE_FOLDER_NAME, AGENT_RESPONSE_MODULE_NAME } from "./constants";
7
+
8
+ export const AGENT_STEP_CLASSNAME = "k-agent-step";
9
+
10
+ const states = [] as const;
11
+ const options = {};
12
+
13
+ export type KendoAgentStepProps = {
14
+ /** Icon name for the step type (e.g. "sparkles", "search", "wrench", "code", "file-txt") */
15
+ icon?: string;
16
+ /** Primary label text (bold) — e.g. "Thinking", "bash", "edit", "read" */
17
+ label?: string;
18
+ /** Additional class names applied to the label span (e.g. "k-text-shimmer" for active/streaming state) */
19
+ labelClassName?: string;
20
+ /** Secondary descriptive text (subtle) — e.g. "src/utils/formatDate.ts", "git diff --stat" */
21
+ secondaryLabel?: string;
22
+ /** Number of lines added (rendered green with + prefix) */
23
+ linesAdded?: number;
24
+ /** Number of lines removed (rendered red with - prefix) */
25
+ linesRemoved?: number;
26
+ /** Duration string — e.g. "120ms", "4m 18s" */
27
+ time?: string;
28
+ /** Status badge text — e.g. "Completed", "Awaiting Approval", "No results found" */
29
+ status?: string;
30
+ /** Theme color for the status Badge */
31
+ statusThemeColor?: "base" | "success" | "warning" | "error" | "info";
32
+ /** Status Badge icon — e.g. "check-circle", "exclamation-circle", "x-circle" */
33
+ statusIcon?: string;
34
+ /** Whether the step can be expanded */
35
+ expandable?: boolean;
36
+ /** Whether the step is currently expanded */
37
+ expanded?: boolean;
38
+ /** Whether the step has completed (disables the label shimmer and dims the icon/label) */
39
+ completed?: boolean;
40
+ };
41
+
42
+ const defaultOptions = {
43
+ expandable: false,
44
+ expanded: false,
45
+ completed: false,
46
+ };
47
+
48
+ /**
49
+ * @aria {role="button"} The role is implicit from the native <button> element used for the step's head.
50
+ * @aria {aria-expanded="true"|"false"} Rendered on the head only when the step is expandable, indicating whether its body is currently shown.
51
+ * @aria {aria-label|aria-labelledby} Required on the head when it has no visible label/secondaryLabel text (e.g. icon-only steps).
52
+ * @ux {Expand / Collapse} Clicking or activating the step's head via keyboard toggles the body content open and closed.
53
+ * @ux {Hover feedback} Hovering the head highlights it with the app-surface background and normalizes all text/icon colors to on-app-surface.
54
+ * @ux {Completed state} When completed, the label stops shimmering and the icon/label/expand icon dim to a subtle color.
55
+ * @ux {Diff stats} Added/removed line counts always render in success/error colors, regardless of hover or completed state.
56
+ */
57
+ export const AgentStep: KendoComponent<KendoAgentStepProps & React.HTMLAttributes<HTMLDivElement>> = (props: KendoAgentStepProps & KendoBaseProps & React.HTMLAttributes<HTMLDivElement>) => {
58
+ const { icon, label, labelClassName, secondaryLabel, linesAdded, linesRemoved, time, status, statusThemeColor = "success", statusIcon, expandable = defaultOptions.expandable, expanded = defaultOptions.expanded, completed = defaultOptions.completed, className, children, ...other } = props;
59
+
60
+ return (
61
+ <div
62
+ {...other}
63
+ className={classNames(className, AGENT_STEP_CLASSNAME, {
64
+ "k-agent-completed": completed,
65
+ })}
66
+ >
67
+ <button className="k-agent-step-head" aria-expanded={expandable ? expanded : undefined}>
68
+ {icon && <Icon icon={icon} size="small" className="k-agent-step-icon" />}
69
+ <span className="k-agent-step-content">
70
+ {label && <span className={classNames("k-agent-step-label", labelClassName)}>{label}</span>}
71
+ {secondaryLabel && (
72
+ <>
73
+ <span className="k-agent-step-sep">·</span>
74
+ <span className="k-agent-step-secondary">{secondaryLabel}</span>
75
+ </>
76
+ )}
77
+ {linesAdded && <span className="k-agent-step-added">+{linesAdded}</span>}
78
+ {linesRemoved && <span className="k-agent-step-removed">-{linesRemoved}</span>}
79
+ {time && (
80
+ <>
81
+ <span className="k-agent-step-sep">·</span>
82
+ <span className="k-agent-step-time">{time}</span>
83
+ </>
84
+ )}
85
+ {status && (
86
+ <Badge size="small" themeColor={statusThemeColor} rounded="full">
87
+ {statusIcon && <Icon icon={statusIcon} size="small" />}
88
+ {status}
89
+ </Badge>
90
+ )}
91
+ {expandable && <Icon icon={expanded ? "chevron-up" : "chevron-right"} size="small" className="k-agent-step-expand" />}
92
+ </span>
93
+ </button>
94
+ {expanded && children && <div className="k-agent-step-body">{children}</div>}
95
+ </div>
96
+ );
97
+ };
98
+
99
+ AgentStep.states = states;
100
+ AgentStep.options = options;
101
+ AgentStep.className = AGENT_STEP_CLASSNAME;
102
+ AgentStep.defaultOptions = defaultOptions;
103
+ AgentStep.moduleName = AGENT_RESPONSE_MODULE_NAME;
104
+ AgentStep.folderName = AGENT_RESPONSE_FOLDER_NAME;
105
+
106
+ /**
107
+ * @keyboard {Enter or Space} Triggers the focused step's head, toggling the expanded state when the step is expandable.
108
+ * @keyboard {Tab} Moves focus to the next step's head; each AgentStep head is its own stop in the tab sequence.
109
+ *
110
+ * @see https://www.w3.org/WAI/ARIA/apg/patterns/disclosure/ WAI-ARIA Authoring Practices: Disclosure (Show/Hide) Pattern
111
+ */
112
+
113
+ export default AgentStep;
@@ -0,0 +1,45 @@
1
+ import * as React from "react";
2
+ import { classNames } from "../misc";
3
+ import { AgentStep, KendoAgentStepProps } from "./agent-step";
4
+ import { KendoComponent, KendoBaseProps } from "../_types/component";
5
+ import { AGENT_RESPONSE_FOLDER_NAME, AGENT_RESPONSE_MODULE_NAME } from "./constants";
6
+
7
+ export const CHAIN_OF_THOUGHT_CLASSNAME = "k-chain-of-thought";
8
+
9
+ const states = [] as const;
10
+ const options = {};
11
+
12
+ export type KendoChainOfThoughtProps = KendoAgentStepProps;
13
+
14
+ const defaultOptions = {
15
+ icon: "sparkles",
16
+ };
17
+
18
+ /**
19
+ * @aria {role="button"} The role is implicit from the native <button> element used for the step's head.
20
+ * @aria {aria-expanded="true"|"false"} Rendered on the head only when the step is expandable, indicating whether its body is currently shown.
21
+ * @aria {aria-label|aria-labelledby} Required on the head when it has no visible label/secondaryLabel text.
22
+ * @ux {Expand / Collapse} Clicking or activating the head toggles the nested Thought steps open and closed.
23
+ * @ux {Completed state} When completed, the label stops shimmering and the icon/label/expand icon dim to a subtle color.
24
+ */
25
+ export const ChainOfThought: KendoComponent<KendoChainOfThoughtProps & React.HTMLAttributes<HTMLDivElement>> = (props: KendoChainOfThoughtProps & KendoBaseProps & React.HTMLAttributes<HTMLDivElement>) => {
26
+ const { icon = defaultOptions.icon, className, ...other } = props;
27
+
28
+ return <AgentStep {...other} icon={icon} className={classNames(className, CHAIN_OF_THOUGHT_CLASSNAME)} />;
29
+ };
30
+
31
+ ChainOfThought.states = states;
32
+ ChainOfThought.options = options;
33
+ ChainOfThought.className = CHAIN_OF_THOUGHT_CLASSNAME;
34
+ ChainOfThought.defaultOptions = defaultOptions;
35
+ ChainOfThought.moduleName = AGENT_RESPONSE_MODULE_NAME;
36
+ ChainOfThought.folderName = AGENT_RESPONSE_FOLDER_NAME;
37
+
38
+ /**
39
+ * @keyboard {Enter or Space} Triggers the focused head, toggling the expanded state when expandable.
40
+ * @keyboard {Tab} Moves focus to the next ChainOfThought head; each instance is its own stop in the tab sequence.
41
+ *
42
+ * @see https://www.w3.org/WAI/ARIA/apg/patterns/disclosure/ WAI-ARIA Authoring Practices: Disclosure (Show/Hide) Pattern
43
+ */
44
+
45
+ export default ChainOfThought;
@@ -0,0 +1,2 @@
1
+ export const AGENT_RESPONSE_MODULE_NAME = 'agent-response';
2
+ export const AGENT_RESPONSE_FOLDER_NAME = AGENT_RESPONSE_MODULE_NAME;
@@ -0,0 +1,10 @@
1
+ export * from './agent-step';
2
+ export * from './chain-of-thought.spec';
3
+ export * from './templates/chain-of-thought-normal';
4
+ export * from './templates/chain-of-thought-expanded';
5
+ export * from './reasoning.spec';
6
+ export * from './templates/reasoning-normal';
7
+ export * from './templates/reasoning-expanded';
8
+ export * from './tool-call.spec';
9
+ export * from './templates/tool-call-normal';
10
+ export * from './templates/tool-call-expanded';
@@ -0,0 +1,46 @@
1
+ import * as React from "react";
2
+ import { classNames } from "../misc";
3
+ import { AgentStep, KendoAgentStepProps } from "./agent-step";
4
+ import { KendoComponent, KendoBaseProps } from "../_types/component";
5
+ import { AGENT_RESPONSE_FOLDER_NAME, AGENT_RESPONSE_MODULE_NAME } from "./constants";
6
+
7
+ export const REASONING_CLASSNAME = "k-reasoning";
8
+
9
+ const states = [] as const;
10
+ const options = {};
11
+
12
+ export type KendoReasoningProps = KendoAgentStepProps;
13
+
14
+ const defaultOptions = {
15
+ icon: "sparkles",
16
+ label: "Reasoning",
17
+ };
18
+
19
+ /**
20
+ * @aria {role="button"} The role is implicit from the native <button> element used for the step's head.
21
+ * @aria {aria-expanded="true"|"false"} Rendered on the head only when the step is expandable, indicating whether its body is currently shown.
22
+ * @aria {aria-label|aria-labelledby} Required on the head when it has no visible label/secondaryLabel text.
23
+ * @ux {Expand / Collapse} Clicking or activating the head toggles the reasoning body open and closed.
24
+ * @ux {Completed state} When completed, the label stops shimmering and the icon/label/expand icon dim to a subtle color.
25
+ */
26
+ export const Reasoning: KendoComponent<KendoReasoningProps & React.HTMLAttributes<HTMLDivElement>> = (props: KendoReasoningProps & KendoBaseProps & React.HTMLAttributes<HTMLDivElement>) => {
27
+ const { icon = defaultOptions.icon, label = defaultOptions.label, className, ...other } = props;
28
+
29
+ return <AgentStep {...other} icon={icon} label={label} className={classNames(className, REASONING_CLASSNAME)} />;
30
+ };
31
+
32
+ Reasoning.states = states;
33
+ Reasoning.options = options;
34
+ Reasoning.className = REASONING_CLASSNAME;
35
+ Reasoning.defaultOptions = defaultOptions;
36
+ Reasoning.moduleName = AGENT_RESPONSE_MODULE_NAME;
37
+ Reasoning.folderName = AGENT_RESPONSE_FOLDER_NAME;
38
+
39
+ /**
40
+ * @keyboard {Enter or Space} Triggers the focused head, toggling the expanded state when expandable.
41
+ * @keyboard {Tab} Moves focus to the next Reasoning head; each instance is its own stop in the tab sequence.
42
+ *
43
+ * @see https://www.w3.org/WAI/ARIA/apg/patterns/disclosure/ WAI-ARIA Authoring Practices: Disclosure (Show/Hide) Pattern
44
+ */
45
+
46
+ export default Reasoning;
@@ -0,0 +1,9 @@
1
+ import ChainOfThought from '../chain-of-thought.spec';
2
+ import Thought from '../thought.spec';
3
+
4
+ export const ChainOfThoughtExpanded = (props: any) => (
5
+ <ChainOfThought label="Thought" time="for 4m 18s" completed expandable expanded {...props}>
6
+ <Thought icon="search" label="Searched for components" completed />
7
+ <Thought icon="book" label="Reviewed component variants" completed />
8
+ </ChainOfThought>
9
+ );
@@ -0,0 +1,3 @@
1
+ import ChainOfThought from '../chain-of-thought.spec';
2
+
3
+ export const ChainOfThoughtNormal = (props: any) => <ChainOfThought label="Thought" time="for 4m 18s" completed expandable {...props} />;
@@ -0,0 +1,7 @@
1
+ import Reasoning from '../reasoning.spec';
2
+
3
+ export const ReasoningExpanded = (props: any) => (
4
+ <Reasoning time="for 48s" completed expandable expanded {...props}>
5
+ <span>I&apos;ll design a resource component system for an AI chat — covering different resource types, states, and variants. Let me read the relevant skills first.</span>
6
+ </Reasoning>
7
+ );
@@ -0,0 +1,3 @@
1
+ import Reasoning from '../reasoning.spec';
2
+
3
+ export const ReasoningNormal = (props: any) => <Reasoning time="for 48s" completed expandable {...props} />;
@@ -0,0 +1,15 @@
1
+ import ToolCall from '../tool-call.spec';
2
+ import { Card, CardBody } from '../../card';
3
+
4
+ export const ToolCallExpanded = (props: any) => (
5
+ <ToolCall label="tool_name" secondaryLabel="src/utils/formatDate.ts" time="120ms" status="Completed" statusThemeColor="success" statusIcon="check-circle" completed expandable expanded {...props}>
6
+ <div>Parameters</div>
7
+ <Card>
8
+ <CardBody>
9
+ <pre style={{ fontSize: '14px', marginTop: '0px' }}>
10
+ <code>{`cd packages/html && npx tsc --noEmit -p .`}</code>
11
+ </pre>
12
+ </CardBody>
13
+ </Card>
14
+ </ToolCall>
15
+ );
@@ -0,0 +1,3 @@
1
+ import ToolCall from '../tool-call.spec';
2
+
3
+ export const ToolCallNormal = (props: any) => <ToolCall label="tool_name" secondaryLabel="src/utils/formatDate.ts" time="120ms" status="Completed" statusThemeColor="success" statusIcon="check-circle" completed expandable {...props} />;
@@ -0,0 +1,46 @@
1
+ import { ChainOfThought } from "..";
2
+ import { Chip } from "../../chip";
3
+ import Thought from "../thought.spec";
4
+
5
+ export default () => (
6
+ <div id="test-area" className="k-d-flex k-flex-col" style={{ maxWidth: "680px" }}>
7
+ <section>
8
+ <ChainOfThought label="Thought" time="for 4m 18s" completed expandable />
9
+
10
+ <ChainOfThought label="Thought" time="for 4m 18s" completed expandable expanded>
11
+ <Thought icon="search" label="Searched for components" completed />
12
+ <Thought icon="book" label='Found 12 components matching "button". Reviewing variants — identified 3 candidates with primary intent.' completed />
13
+ <Thought icon="book" label="Retrieved design system documentation for Button components." completed>
14
+ <span>
15
+ Retrieved design system documentation for Button components. Found usage guidelines, spacing specs, and variant definitions across 3 libraries. <Chip text="some-link.com +2" icon="globe" size="small" fillMode="outline" rounded="full" />
16
+ </span>
17
+ </Thought>
18
+ <Thought icon="search" label="Searched for related work" completed />
19
+ </ChainOfThought>
20
+
21
+ <ChainOfThought label="Reviewed" secondaryLabel="and updated _theme.scss" linesAdded={3} linesRemoved={1} completed expanded expandable>
22
+ <Thought icon="book" label="Read" secondaryLabel="_theme.scss, lines 1 to 15" completed />
23
+ <Thought icon="search" label="Searched for text" secondaryLabel="text-shimmer, 1 result" completed />
24
+ <Thought icon="book" label="Read" secondaryLabel="_theme.scss, lines 45 to 56" completed />
25
+ <Thought icon="pencil" label="Edited" secondaryLabel="_theme.scss" linesAdded={3} linesRemoved={1} completed />
26
+ </ChainOfThought>
27
+ <ChainOfThought icon="search" label="Searched for components" completed expandable />
28
+ <ChainOfThought icon="book" label="Reviewed component variants" time="for 12s" expandable completed />
29
+
30
+ <ChainOfThought label="Thinking through request" secondaryLabel="I'm considering the best approach to the problem..." expandable expanded>
31
+ <Thought icon="search" label="Searched for components" completed />
32
+ <Thought icon="book" label='Found 12 components matching "button". Reviewing variants — identified 3 candidates with primary intent.' completed />
33
+ {/* active thought */}
34
+ <Thought icon="search" label="Searching for related work...">
35
+ <div className="k-d-flex k-flex-wrap k-gap-1">
36
+ <Chip text="some-link.com" icon="globe" size="small" fillMode="outline" rounded="full" />
37
+ <Chip text="some-link.com" icon="globe" size="small" fillMode="outline" rounded="full" />
38
+ <Chip text="some-link.com" icon="globe" size="small" fillMode="outline" rounded="full" />
39
+ <Chip text="some-link.com" icon="globe" size="small" fillMode="outline" rounded="full" />
40
+ <Chip text="some-link.com" icon="globe" size="small" fillMode="outline" rounded="full" />
41
+ </div>
42
+ </Thought>
43
+ </ChainOfThought>
44
+ </section>
45
+ </div>
46
+ );
@@ -0,0 +1,21 @@
1
+ import { Reasoning } from "..";
2
+
3
+ export default () => (
4
+ <div id="test-area" className="k-d-flex k-flex-col" style={{ maxWidth: "680px" }}>
5
+ <section>
6
+ <Reasoning time="for 48s" completed label="Completed" expandable />
7
+
8
+ <Reasoning time="for 48s" completed label="Completed" expandable expanded>
9
+ <span>I'll design a resource component system for an AI chat — covering different resource types, states, and variants. Let me read the relevant skills first.</span>
10
+ <span>I'll gather local design system context, then create a comprehensive resource component system.</span>
11
+ </Reasoning>
12
+
13
+ <Reasoning expandable secondaryLabel="I'm considering the best approach to the problem..." />
14
+
15
+ <Reasoning expandable secondaryLabel="I'm considering the best approach to the problem..." expanded>
16
+ <span>I'll design a resource component system for an AI chat — covering different resource types, states, and variants. Let me read the relevant skills first.</span>
17
+ <span>I'll gather local design system context, then create a comprehensive resource component system.</span>
18
+ </Reasoning>
19
+ </section>
20
+ </div>
21
+ );
@@ -0,0 +1,69 @@
1
+ import * as React from "react";
2
+ import { ToolCall } from "..";
3
+ import { Card, CardBody } from "../../card";
4
+ import { Button } from "../../button";
5
+ import { ActionButtons } from "../../action-buttons";
6
+ import { MessageBox } from "../../message-box";
7
+
8
+ export default () => (
9
+ <div id="test-area" className="k-d-flex k-flex-col">
10
+ <section>
11
+ <ToolCall label="tool_name" secondaryLabel="src/utils/formatDate.ts" time="120ms" status="Completed" statusThemeColor="success" statusIcon="check-circle" completed expandable />
12
+
13
+ <ToolCall label="tool_name" secondaryLabel="src/utils/formatDate.ts" time="120ms" status="Completed" statusThemeColor="success" statusIcon="check-circle" completed expandable />
14
+
15
+ <ToolCall label="tool_name" secondaryLabel="src/utils/formatDate.ts" time="120ms" status="Completed" statusThemeColor="success" statusIcon="check-circle" completed expandable expanded>
16
+ <div>Parameters</div>
17
+ <Card>
18
+ <CardBody>
19
+ <pre style={{ fontSize: "14px", marginTop: "0px" }}>
20
+ <code>{`cd packages/html && npx tsc --noEmit -p . 2>&1 | head -50`}</code>
21
+ </pre>
22
+ </CardBody>
23
+ </Card>
24
+ <div>Result</div>
25
+ <Card>
26
+ <CardBody>
27
+ <pre style={{ fontSize: "14px", marginTop: "0px" }}>
28
+ <code>{`> @progress/kendo-themes-html@14.4.0-dev.1 typecheck
29
+ > npx tsc --noEmit --emitDeclarationOnly false --project tsconfig.json
30
+ `}</code>
31
+ </pre>
32
+ </CardBody>
33
+ </Card>
34
+ </ToolCall>
35
+
36
+ <ToolCall label="tool_name" status="Awaiting Approval" statusThemeColor="warning" statusIcon="exclamation-circle" expandable expanded>
37
+ <div>Parameters</div>
38
+ <Card>
39
+ <CardBody>
40
+ <pre style={{ fontSize: "14px", marginTop: "0px" }}>
41
+ <code>{`cd packages/html && npx tsc --noEmit -p . 2>&1 | head -50`}</code>
42
+ </pre>
43
+ </CardBody>
44
+ </Card>
45
+ <Card>
46
+ <CardBody>
47
+ <p>This command will execute a TS Typecheck in your codebase.</p>
48
+ </CardBody>
49
+ <ActionButtons alignment="end" className="k-card-actions">
50
+ <Button text="Reject" fillMode="outline" />
51
+ <Button text="Approve" themeColor="primary" fillMode="solid" />
52
+ </ActionButtons>
53
+ </Card>
54
+ </ToolCall>
55
+
56
+ <ToolCall label="tool_name" status="Error" statusThemeColor="error" statusIcon="exclamation-circle" expandable expanded>
57
+ <div>Parameters</div>
58
+ <Card>
59
+ <CardBody>
60
+ <pre style={{ fontSize: "14px", marginTop: "0px" }}>
61
+ <code>{`cd packages/hmtl && npx tsc --noEmit -p . 2>&1 | head -50`}</code>
62
+ </pre>
63
+ </CardBody>
64
+ </Card>
65
+ <MessageBox themeColor="error">cd: no such file or directory: packges/hmtl</MessageBox>
66
+ </ToolCall>
67
+ </section>
68
+ </div>
69
+ );
@@ -0,0 +1,96 @@
1
+ import * as React from "react";
2
+ import { classNames } from "../misc";
3
+ import { Icon } from "../icon";
4
+ import { Badge } from "../badge";
5
+ import { KendoComponent } from "../_types/component";
6
+ import { AGENT_RESPONSE_FOLDER_NAME, AGENT_RESPONSE_MODULE_NAME } from "./constants";
7
+
8
+ export const THOUGHT_CLASSNAME = "k-thought";
9
+
10
+ const states = [] as const;
11
+ const options = {};
12
+
13
+ export type KendoThoughtProps = {
14
+ /** Icon name for the step type (e.g. "sparkles", "search", "wrench", "code", "file-txt") */
15
+ icon?: string;
16
+ /** Primary label text (bold) — e.g. "Thinking", "bash", "edit", "read" */
17
+ label?: string;
18
+ /** Additional class names applied to the label span (e.g. "k-text-shimmer" for active/streaming state) */
19
+ labelClassName?: string;
20
+ /** Secondary descriptive text (subtle) — e.g. "src/utils/formatDate.ts", "git diff --stat" */
21
+ secondaryLabel?: string;
22
+ /** Number of lines added (rendered green with + prefix) */
23
+ linesAdded?: number;
24
+ /** Number of lines removed (rendered red with - prefix) */
25
+ linesRemoved?: number;
26
+ /** Duration string — e.g. "120ms", "4m 18s" */
27
+ time?: string;
28
+ /** Status badge text — e.g. "Completed", "Awaiting Approval", "No results found" */
29
+ status?: string;
30
+ /** Theme color for the status Badge */
31
+ statusThemeColor?: "base" | "success" | "warning" | "error" | "info";
32
+ /** Status Badge icon — e.g. "check-circle", "exclamation-circle", "x-circle" */
33
+ statusIcon?: string;
34
+ /** Whether the thought has completed (disables the label shimmer and dims the icon/label) */
35
+ completed?: boolean;
36
+ };
37
+
38
+ const defaultOptions = {
39
+ completed: false,
40
+ };
41
+
42
+ /**
43
+ * @ux {Completed state} When completed, the label stops shimmering and the icon/label dim to a subtle color.
44
+ * @ux {Diff stats} Added/removed line counts always render in success/error colors, regardless of completed state.
45
+ */
46
+ export const Thought: KendoComponent<KendoThoughtProps & React.HTMLAttributes<HTMLDivElement>> = (props: KendoThoughtProps & React.HTMLAttributes<HTMLDivElement>) => {
47
+ const { icon, label, labelClassName, secondaryLabel, linesAdded, linesRemoved, time, status, statusThemeColor = "success", statusIcon, completed = defaultOptions.completed, className, children, ...other } = props;
48
+
49
+ return (
50
+ <div
51
+ {...other}
52
+ className={classNames(className, THOUGHT_CLASSNAME, {
53
+ "k-thought-completed": completed,
54
+ })}
55
+ >
56
+ {icon && (
57
+ <span className="k-agent-step-icon-col">
58
+ <Icon icon={icon} size="small" className="k-agent-step-icon" />
59
+ </span>
60
+ )}
61
+ <span className="k-agent-step-content">
62
+ {label && <span className={classNames("k-agent-step-label", labelClassName)}>{label}</span>}
63
+ {secondaryLabel && (
64
+ <>
65
+ <span className="k-agent-step-sep">·</span>
66
+ <span className="k-agent-step-secondary">{secondaryLabel}</span>
67
+ </>
68
+ )}
69
+ {linesAdded && <span className="k-agent-step-added">+{linesAdded}</span>}
70
+ {linesRemoved && <span className="k-agent-step-removed">-{linesRemoved}</span>}
71
+ {time && (
72
+ <>
73
+ <span className="k-agent-step-sep">·</span>
74
+ <span className="k-agent-step-time">{time}</span>
75
+ </>
76
+ )}
77
+ {status && (
78
+ <Badge size="small" themeColor={statusThemeColor} rounded="full">
79
+ {statusIcon && <Icon icon={statusIcon} size="small" />}
80
+ {status}
81
+ </Badge>
82
+ )}
83
+ {children && <div className="k-agent-step-body">{children}</div>}
84
+ </span>
85
+ </div>
86
+ );
87
+ };
88
+
89
+ Thought.states = states;
90
+ Thought.options = options;
91
+ Thought.className = THOUGHT_CLASSNAME;
92
+ Thought.defaultOptions = defaultOptions;
93
+ Thought.moduleName = AGENT_RESPONSE_MODULE_NAME;
94
+ Thought.folderName = AGENT_RESPONSE_FOLDER_NAME;
95
+
96
+ export default Thought;
@@ -0,0 +1,46 @@
1
+ import * as React from "react";
2
+ import { classNames } from "../misc";
3
+ import { AgentStep, KendoAgentStepProps } from "./agent-step";
4
+ import { KendoComponent, KendoBaseProps } from "../_types/component";
5
+ import { AGENT_RESPONSE_FOLDER_NAME, AGENT_RESPONSE_MODULE_NAME } from "./constants";
6
+
7
+ export const TOOL_CALL_CLASSNAME = "k-tool-call";
8
+
9
+ const states = [] as const;
10
+ const options = {};
11
+
12
+ export type KendoToolCallProps = KendoAgentStepProps;
13
+
14
+ const defaultOptions = {
15
+ icon: "wrench",
16
+ };
17
+
18
+ /**
19
+ * @aria {role="button"} The role is implicit from the native <button> element used for the step's head.
20
+ * @aria {aria-expanded="true"|"false"} Rendered on the head only when the step is expandable, indicating whether its body is currently shown.
21
+ * @aria {aria-label|aria-labelledby} Required on the head when it has no visible label/secondaryLabel text.
22
+ * @ux {Expand / Collapse} Clicking or activating the head toggles the tool call body (parameters, results, approval actions) open and closed.
23
+ * @ux {Status} The optional status Badge reflects the call's outcome (e.g. "Completed", "Awaiting Approval", "Error").
24
+ * @ux {Completed state} When completed, the label stops shimmering and the icon/label/expand icon dim to a subtle color.
25
+ */
26
+ export const ToolCall: KendoComponent<KendoToolCallProps & React.HTMLAttributes<HTMLDivElement>> = (props: KendoToolCallProps & KendoBaseProps & React.HTMLAttributes<HTMLDivElement>) => {
27
+ const { icon = defaultOptions.icon, className, ...other } = props;
28
+
29
+ return <AgentStep {...other} icon={icon} className={classNames(className, TOOL_CALL_CLASSNAME)} />;
30
+ };
31
+
32
+ ToolCall.states = states;
33
+ ToolCall.options = options;
34
+ ToolCall.className = TOOL_CALL_CLASSNAME;
35
+ ToolCall.defaultOptions = defaultOptions;
36
+ ToolCall.moduleName = AGENT_RESPONSE_MODULE_NAME;
37
+ ToolCall.folderName = AGENT_RESPONSE_FOLDER_NAME;
38
+
39
+ /**
40
+ * @keyboard {Enter or Space} Triggers the focused head, toggling the expanded state when expandable.
41
+ * @keyboard {Tab} Moves focus to the next ToolCall head; each instance is its own stop in the tab sequence.
42
+ *
43
+ * @see https://www.w3.org/WAI/ARIA/apg/patterns/disclosure/ WAI-ARIA Authoring Practices: Disclosure (Show/Hide) Pattern
44
+ */
45
+
46
+ export default ToolCall;
@@ -0,0 +1,52 @@
1
+ import * as React from "react";
2
+ import { classNames } from "../misc";
3
+ import { KendoComponent } from "../_types/component";
4
+ import { CHECKPOINT_FOLDER_NAME, CHECKPOINT_MODULE_NAME } from "./constants";
5
+
6
+ export const CHECKPOINT_CLASSNAME = "k-checkpoint";
7
+
8
+ const states = [] as const;
9
+ const options = {};
10
+
11
+ export type KendoCheckpointProps = {
12
+ /** Forces the checkpoint to stay visible (opacity 1). By default it's only revealed on hover/focus. */
13
+ visible?: boolean;
14
+ };
15
+
16
+ const defaultOptions = {};
17
+
18
+ /**
19
+ * @aria {aria-hidden="true"} The gradient separator lines are decorative and hidden from assistive technologies.
20
+ *
21
+ * @ux {Hover reveal} Hidden by default and faded in on hover of the checkpoint or when a descendant (e.g. a Button) receives focus.
22
+ * @ux {Always visible} Set the `visible` prop to keep the checkpoint permanently shown, bypassing the hover/focus reveal.
23
+ */
24
+ export const Checkpoint: KendoComponent<KendoCheckpointProps & React.HTMLAttributes<HTMLDivElement>> = (props: KendoCheckpointProps & React.HTMLAttributes<HTMLDivElement>) => {
25
+ const { className, children, visible, ...other } = props;
26
+
27
+ return (
28
+ <div
29
+ {...other}
30
+ className={classNames(className, CHECKPOINT_CLASSNAME, {
31
+ "k-checkpoint-visible": visible === true,
32
+ })}
33
+ >
34
+ <span className="k-checkpoint-line" aria-hidden="true"></span>
35
+ {children}
36
+ <span className="k-checkpoint-line" aria-hidden="true"></span>
37
+ </div>
38
+ );
39
+ };
40
+
41
+ Checkpoint.states = states;
42
+ Checkpoint.options = options;
43
+ Checkpoint.className = CHECKPOINT_CLASSNAME;
44
+ Checkpoint.defaultOptions = defaultOptions;
45
+ Checkpoint.moduleName = CHECKPOINT_MODULE_NAME;
46
+ Checkpoint.folderName = CHECKPOINT_FOLDER_NAME;
47
+
48
+ /**
49
+ * @keyboard {Tab} Focusing an interactive descendant (e.g. a Button) reveals the checkpoint via `:focus-within`.
50
+ */
51
+
52
+ export default Checkpoint;
@@ -0,0 +1,2 @@
1
+ export const CHECKPOINT_MODULE_NAME = 'checkpoint';
2
+ export const CHECKPOINT_FOLDER_NAME = CHECKPOINT_MODULE_NAME;
@@ -0,0 +1,2 @@
1
+ export * from './checkpoint.spec';
2
+ export * from './templates/checkpoint-normal';
@@ -0,0 +1,8 @@
1
+ import Checkpoint from '../checkpoint.spec';
2
+ import { Button } from '../../button';
3
+
4
+ export const CheckpointNormal = (props: any) => (
5
+ <Checkpoint visible {...props}>
6
+ <Button text="Restore Checkpoint" fillMode="flat" size="small" />
7
+ </Checkpoint>
8
+ );