@robr0/design-system 0.3.0 → 0.4.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.
- package/README.md +30 -27
- package/components/AgentStatus/AgentStatus.css +436 -0
- package/components/AgentStatus/AgentStatus.d.ts +37 -0
- package/components/AgentStatus/AgentStatus.js +53 -0
- package/components/AgentStatus/AgentStatusPatterns.d.ts +17 -0
- package/components/AgentStatus/AgentStatusPatterns.js +20 -0
- package/components/AlertDialog/AlertDialog.css +5 -5
- package/components/Button/Button.d.ts +14 -2
- package/components/ButtonGroup/ButtonGroup.js +2 -9
- package/components/Checkbox/Checkbox.d.ts +17 -3
- package/components/CircularButton/CircularButton.d.ts +9 -3
- package/components/CircularButton/CircularButton.js +4 -2
- package/components/Combobox/Combobox.d.ts +10 -2
- package/components/ContextMenu/ContextMenu.css +0 -4
- package/components/DateInput/DateInput.d.ts +5 -1
- package/components/Dialog/Dialog.css +5 -5
- package/components/Dropdown/Dropdown.css +2 -4
- package/components/Dropdown/Dropdown.d.ts +10 -2
- package/components/DropdownMenu/DropdownMenu.css +2 -4
- package/components/FileInput/FileInput.d.ts +5 -1
- package/components/Input/Input.d.ts +5 -1
- package/components/LinkList/LinkList.d.ts +1 -0
- package/components/RadioButton/RadioButton.d.ts +17 -3
- package/components/Reasoning/Reasoning.css +152 -0
- package/components/Reasoning/Reasoning.d.ts +36 -0
- package/components/Reasoning/Reasoning.js +69 -0
- package/components/SelectionCard/SelectionCard.d.ts +5 -1
- package/components/Slider/Slider.d.ts +5 -1
- package/components/Textarea/Textarea.d.ts +5 -1
- package/components/Timeline/Timeline.d.ts +2 -0
- package/components/ToggleGroup/ToggleGroup.d.ts +10 -2
- package/components/ToggleSwitch/ToggleSwitch.d.ts +10 -2
- package/components/ToolCall/ToolCall.css +213 -0
- package/components/ToolCall/ToolCall.d.ts +43 -0
- package/components/ToolCall/ToolCall.js +89 -0
- package/components/registry.json +32 -7
- package/components/registry.json.d.ts +32 -7
- package/components/registry.json.js +2 -2
- package/index.d.ts +4 -0
- package/index.js +8 -0
- package/package.json +8 -4
- package/tokens/registry.json +1 -0
- package/tokens/registry.json.d.ts +1 -0
- package/tokens/registry.json.js +1 -1
- package/tokens/tokens-motion.css +3 -1
|
@@ -23,7 +23,11 @@ type TextareaOwnProps = {
|
|
|
23
23
|
onValueChange?: (value: string) => void;
|
|
24
24
|
/** Additional CSS classes — applied to the wrapper, not the <textarea> */
|
|
25
25
|
className?: string;
|
|
26
|
-
/**
|
|
26
|
+
/**
|
|
27
|
+
* Legacy accessible-name prop.
|
|
28
|
+
*
|
|
29
|
+
* @deprecated Pass the native `aria-label` attribute instead.
|
|
30
|
+
*/
|
|
27
31
|
ariaLabel?: string;
|
|
28
32
|
};
|
|
29
33
|
export interface TextareaProps extends TextareaOwnProps, Omit<React.ComponentPropsWithoutRef<'textarea'>, keyof TextareaOwnProps> {
|
|
@@ -35,6 +35,7 @@ export interface TimelineCompany {
|
|
|
35
35
|
}
|
|
36
36
|
/** Default variant — a flat sequence of steps/events with dot, badge, or icon markers. */
|
|
37
37
|
export interface TimelineDefaultProps {
|
|
38
|
+
/** Selects the flat step/event layout — the default when omitted */
|
|
38
39
|
variant?: 'default';
|
|
39
40
|
/** Ordered list of steps/events */
|
|
40
41
|
items: TimelineItem[];
|
|
@@ -47,6 +48,7 @@ export interface TimelineDefaultProps {
|
|
|
47
48
|
}
|
|
48
49
|
/** Company variant — grouped roles under a logo, for résumé/pipeline histories. */
|
|
49
50
|
export interface TimelineCompanyProps {
|
|
51
|
+
/** Selects the grouped layout: roles nested under a company logo */
|
|
50
52
|
variant: 'company';
|
|
51
53
|
/** Ordered list of company/tool entries */
|
|
52
54
|
items: TimelineCompany[];
|
|
@@ -23,9 +23,17 @@ type ToggleGroupOwnProps = {
|
|
|
23
23
|
onValueChange?: (value: string | string[]) => void;
|
|
24
24
|
/** Additional CSS classes */
|
|
25
25
|
className?: string;
|
|
26
|
-
/**
|
|
26
|
+
/**
|
|
27
|
+
* Legacy change handler, kept for backwards compatibility.
|
|
28
|
+
*
|
|
29
|
+
* @deprecated Use `onValueChange` instead.
|
|
30
|
+
*/
|
|
27
31
|
onChange?: (value: string | string[]) => void;
|
|
28
|
-
/**
|
|
32
|
+
/**
|
|
33
|
+
* Legacy accessible-name prop.
|
|
34
|
+
*
|
|
35
|
+
* @deprecated Pass the native `aria-label` attribute instead.
|
|
36
|
+
*/
|
|
29
37
|
ariaLabel?: string;
|
|
30
38
|
};
|
|
31
39
|
export interface ToggleGroupProps extends ToggleGroupOwnProps, Omit<React.ComponentPropsWithoutRef<'div'>, keyof ToggleGroupOwnProps> {
|
|
@@ -13,9 +13,17 @@ type ToggleSwitchOwnProps = {
|
|
|
13
13
|
onCheckedChange?: (checked: boolean) => void;
|
|
14
14
|
/** Additional CSS classes */
|
|
15
15
|
className?: string;
|
|
16
|
-
/**
|
|
16
|
+
/**
|
|
17
|
+
* Legacy change handler, kept for backwards compatibility.
|
|
18
|
+
*
|
|
19
|
+
* @deprecated Use `onCheckedChange` instead.
|
|
20
|
+
*/
|
|
17
21
|
onChange?: (checked: boolean) => void;
|
|
18
|
-
/**
|
|
22
|
+
/**
|
|
23
|
+
* Legacy accessible-name prop.
|
|
24
|
+
*
|
|
25
|
+
* @deprecated Pass the native `aria-label` attribute instead.
|
|
26
|
+
*/
|
|
19
27
|
ariaLabel?: string;
|
|
20
28
|
};
|
|
21
29
|
export interface ToggleSwitchProps extends ToggleSwitchOwnProps, Omit<React.ComponentPropsWithoutRef<'button'>, keyof ToggleSwitchOwnProps | 'type'> {
|
|
@@ -0,0 +1,213 @@
|
|
|
1
|
+
/* ============================================
|
|
2
|
+
TOOL CALL COMPONENT
|
|
3
|
+
One tool invocation: a skimmable header row
|
|
4
|
+
and, behind a disclosure, the arguments and
|
|
5
|
+
the result.
|
|
6
|
+
|
|
7
|
+
The container stays neutral — colour lives in
|
|
8
|
+
the indicator and the status word, so a long
|
|
9
|
+
run of calls reads as a list rather than a
|
|
10
|
+
wall of tinted cards. The two states a person
|
|
11
|
+
has to act on, pending and error, also take a
|
|
12
|
+
coloured border.
|
|
13
|
+
============================================ */
|
|
14
|
+
|
|
15
|
+
.ds-tool-call {
|
|
16
|
+
--ds-tool-call-color: var(--color-text-secondary);
|
|
17
|
+
--ds-tool-call-border: var(--color-bg-container-border);
|
|
18
|
+
|
|
19
|
+
display: flex;
|
|
20
|
+
flex-direction: column;
|
|
21
|
+
width: 100%;
|
|
22
|
+
background-color: var(--color-bg-container-primary);
|
|
23
|
+
border: var(--border-xs) solid var(--ds-tool-call-border);
|
|
24
|
+
border-radius: var(--radius-md);
|
|
25
|
+
overflow: hidden;
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
/* ============================================
|
|
29
|
+
HEADER
|
|
30
|
+
============================================ */
|
|
31
|
+
|
|
32
|
+
.ds-tool-call__header {
|
|
33
|
+
display: flex;
|
|
34
|
+
align-items: center;
|
|
35
|
+
gap: var(--gap-sm);
|
|
36
|
+
width: 100%;
|
|
37
|
+
padding: var(--padding-xs) var(--padding-sm-md);
|
|
38
|
+
background: none;
|
|
39
|
+
border: none;
|
|
40
|
+
text-align: left;
|
|
41
|
+
cursor: pointer;
|
|
42
|
+
transition: background-color var(--motion-duration-fast) var(--motion-ease-standard);
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
.ds-tool-call__header:hover {
|
|
46
|
+
background-color: var(--color-bg-container-secondary);
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
.ds-tool-call__header:focus-visible {
|
|
50
|
+
outline: 2px solid var(--color-action-primary-bg);
|
|
51
|
+
outline-offset: -2px;
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
/* No panel to open — the row is a plain div and must not look pressable */
|
|
55
|
+
.ds-tool-call__header--static {
|
|
56
|
+
cursor: default;
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
.ds-tool-call__header--static:hover {
|
|
60
|
+
background-color: transparent;
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
.ds-tool-call__indicator {
|
|
64
|
+
display: inline-flex;
|
|
65
|
+
align-items: center;
|
|
66
|
+
justify-content: center;
|
|
67
|
+
flex: none;
|
|
68
|
+
color: var(--ds-tool-call-color);
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
.ds-tool-call__indicator .material-symbols-rounded {
|
|
72
|
+
--icon-size: var(--icon-size-sm);
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
/* The tool name is an identifier, so it takes the same monospace
|
|
76
|
+
context CodeBlock uses — the one place the system leaves Nunito Sans */
|
|
77
|
+
.ds-tool-call__name {
|
|
78
|
+
flex: none;
|
|
79
|
+
font-family: ui-monospace, 'SF Mono', SFMono-Regular, Menlo, Consolas, monospace;
|
|
80
|
+
font-size: var(--font-paragraph-sm-size);
|
|
81
|
+
line-height: var(--font-paragraph-sm-line-height);
|
|
82
|
+
color: var(--color-text-primary);
|
|
83
|
+
}
|
|
84
|
+
|
|
85
|
+
.ds-tool-call__summary {
|
|
86
|
+
flex: 1 1 auto;
|
|
87
|
+
min-width: 0;
|
|
88
|
+
overflow: hidden;
|
|
89
|
+
text-overflow: ellipsis;
|
|
90
|
+
white-space: nowrap;
|
|
91
|
+
color: var(--color-text-tertiary);
|
|
92
|
+
font-family: var(--font-paragraph-sm-family);
|
|
93
|
+
font-size: var(--font-paragraph-sm-size);
|
|
94
|
+
font-weight: var(--font-paragraph-sm-weight);
|
|
95
|
+
line-height: var(--font-paragraph-sm-line-height);
|
|
96
|
+
letter-spacing: var(--font-paragraph-sm-letter-spacing);
|
|
97
|
+
}
|
|
98
|
+
|
|
99
|
+
.ds-tool-call__status {
|
|
100
|
+
flex: none;
|
|
101
|
+
margin-left: auto;
|
|
102
|
+
color: var(--ds-tool-call-color);
|
|
103
|
+
font-family: var(--font-paragraph-sm-em-family);
|
|
104
|
+
font-size: var(--font-paragraph-sm-em-size);
|
|
105
|
+
font-weight: var(--font-paragraph-sm-em-weight);
|
|
106
|
+
line-height: var(--font-paragraph-sm-em-line-height);
|
|
107
|
+
letter-spacing: var(--font-paragraph-sm-em-letter-spacing);
|
|
108
|
+
white-space: nowrap;
|
|
109
|
+
}
|
|
110
|
+
|
|
111
|
+
/* A summary already claims the free space; without one the status still
|
|
112
|
+
needs pushing to the right, which the auto margin above handles */
|
|
113
|
+
.ds-tool-call__summary ~ .ds-tool-call__status {
|
|
114
|
+
margin-left: 0;
|
|
115
|
+
}
|
|
116
|
+
|
|
117
|
+
.ds-tool-call__duration {
|
|
118
|
+
flex: none;
|
|
119
|
+
color: var(--color-text-tertiary);
|
|
120
|
+
font-family: var(--font-paragraph-sm-family);
|
|
121
|
+
font-size: var(--font-paragraph-sm-size);
|
|
122
|
+
font-weight: var(--font-paragraph-sm-weight);
|
|
123
|
+
line-height: var(--font-paragraph-sm-line-height);
|
|
124
|
+
letter-spacing: var(--font-paragraph-sm-letter-spacing);
|
|
125
|
+
font-variant-numeric: tabular-nums;
|
|
126
|
+
white-space: nowrap;
|
|
127
|
+
}
|
|
128
|
+
|
|
129
|
+
.ds-tool-call__chevron {
|
|
130
|
+
--icon-size: var(--icon-size-sm);
|
|
131
|
+
|
|
132
|
+
flex: none;
|
|
133
|
+
color: var(--color-icon-secondary);
|
|
134
|
+
transition: transform var(--motion-duration-slow) var(--motion-ease-standard);
|
|
135
|
+
}
|
|
136
|
+
|
|
137
|
+
.ds-tool-call--open .ds-tool-call__chevron {
|
|
138
|
+
transform: rotate(180deg);
|
|
139
|
+
}
|
|
140
|
+
|
|
141
|
+
/* ============================================
|
|
142
|
+
STATUSES
|
|
143
|
+
============================================ */
|
|
144
|
+
|
|
145
|
+
.ds-tool-call--pending {
|
|
146
|
+
--ds-tool-call-color: var(--color-status-warning-text);
|
|
147
|
+
--ds-tool-call-border: var(--color-status-warning-border);
|
|
148
|
+
}
|
|
149
|
+
|
|
150
|
+
.ds-tool-call--running {
|
|
151
|
+
--ds-tool-call-color: var(--color-status-info-text);
|
|
152
|
+
}
|
|
153
|
+
|
|
154
|
+
.ds-tool-call--success {
|
|
155
|
+
--ds-tool-call-color: var(--color-status-positive-text);
|
|
156
|
+
}
|
|
157
|
+
|
|
158
|
+
.ds-tool-call--error {
|
|
159
|
+
--ds-tool-call-color: var(--color-status-error-text);
|
|
160
|
+
--ds-tool-call-border: var(--color-status-error-border);
|
|
161
|
+
}
|
|
162
|
+
|
|
163
|
+
/* ============================================
|
|
164
|
+
PANEL
|
|
165
|
+
============================================ */
|
|
166
|
+
|
|
167
|
+
.ds-tool-call__panel {
|
|
168
|
+
display: grid;
|
|
169
|
+
grid-template-rows: 0fr;
|
|
170
|
+
visibility: hidden;
|
|
171
|
+
transition:
|
|
172
|
+
grid-template-rows var(--motion-duration-slow) var(--motion-ease-standard),
|
|
173
|
+
visibility var(--motion-duration-slow) var(--motion-ease-standard);
|
|
174
|
+
}
|
|
175
|
+
|
|
176
|
+
.ds-tool-call--open .ds-tool-call__panel {
|
|
177
|
+
grid-template-rows: 1fr;
|
|
178
|
+
visibility: visible;
|
|
179
|
+
}
|
|
180
|
+
|
|
181
|
+
.ds-tool-call__content {
|
|
182
|
+
overflow: hidden;
|
|
183
|
+
min-height: 0;
|
|
184
|
+
}
|
|
185
|
+
|
|
186
|
+
.ds-tool-call--open .ds-tool-call__content {
|
|
187
|
+
padding: var(--padding-sm-md);
|
|
188
|
+
border-top: var(--border-xs) solid var(--color-divider);
|
|
189
|
+
}
|
|
190
|
+
|
|
191
|
+
.ds-tool-call__content > :first-child {
|
|
192
|
+
margin-top: 0;
|
|
193
|
+
}
|
|
194
|
+
|
|
195
|
+
.ds-tool-call__content > :last-child {
|
|
196
|
+
margin-bottom: 0;
|
|
197
|
+
}
|
|
198
|
+
|
|
199
|
+
/* ============================================
|
|
200
|
+
ACTIONS
|
|
201
|
+
Outside the panel, so a call awaiting approval
|
|
202
|
+
can be answered without expanding it first.
|
|
203
|
+
============================================ */
|
|
204
|
+
|
|
205
|
+
.ds-tool-call__actions {
|
|
206
|
+
display: flex;
|
|
207
|
+
align-items: center;
|
|
208
|
+
justify-content: flex-end;
|
|
209
|
+
gap: var(--gap-sm);
|
|
210
|
+
padding: var(--padding-sm) var(--padding-sm-md);
|
|
211
|
+
border-top: var(--border-xs) solid var(--color-divider);
|
|
212
|
+
background-color: var(--color-bg-container-secondary);
|
|
213
|
+
}
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
export type ToolCallStatus = 'pending' | 'running' | 'success' | 'error';
|
|
3
|
+
/** Props owned by ToolCall itself — everything else falls through to the root element. */
|
|
4
|
+
type ToolCallOwnProps = {
|
|
5
|
+
/** The tool that was invoked, shown in monospace. */
|
|
6
|
+
name: string;
|
|
7
|
+
/** Where the call has got to. Drives the colour, the indicator, and the default status text. */
|
|
8
|
+
status?: ToolCallStatus;
|
|
9
|
+
/** One line describing this particular call, e.g. the target path or query. */
|
|
10
|
+
summary?: string;
|
|
11
|
+
/** How long the call took, e.g. "1.2s". Free text, so callers keep their own formatting. */
|
|
12
|
+
duration?: string;
|
|
13
|
+
/** Override the status text shown beside the indicator. */
|
|
14
|
+
statusLabel?: string;
|
|
15
|
+
/** Open state for controlled use. Pair with `onOpenChange`. */
|
|
16
|
+
open?: boolean;
|
|
17
|
+
/** Open state for uncontrolled use. */
|
|
18
|
+
defaultOpen?: boolean;
|
|
19
|
+
/** Fires whenever the panel opens or closes. */
|
|
20
|
+
onOpenChange?: (open: boolean) => void;
|
|
21
|
+
/**
|
|
22
|
+
* Controls for a call awaiting a decision — allow, deny, always allow.
|
|
23
|
+
* Rendered outside the collapsible panel, so approving never requires
|
|
24
|
+
* expanding the call first.
|
|
25
|
+
*/
|
|
26
|
+
actions?: React.ReactNode;
|
|
27
|
+
/** Additional CSS classes */
|
|
28
|
+
className?: string;
|
|
29
|
+
/** The call's arguments and result. */
|
|
30
|
+
children?: React.ReactNode;
|
|
31
|
+
};
|
|
32
|
+
export interface ToolCallProps extends ToolCallOwnProps, Omit<React.ComponentPropsWithoutRef<'div'>, keyof ToolCallOwnProps> {
|
|
33
|
+
}
|
|
34
|
+
/**
|
|
35
|
+
* ToolCall is the record of one tool invocation: what ran, how it went, how
|
|
36
|
+
* long it took, and — behind a disclosure — the arguments it was given and
|
|
37
|
+
* what it returned.
|
|
38
|
+
*
|
|
39
|
+
* A run is mostly a list of these, so the collapsed header carries everything
|
|
40
|
+
* needed to skim it and the body holds everything needed to audit it.
|
|
41
|
+
*/
|
|
42
|
+
export declare const ToolCall: React.ForwardRefExoticComponent<ToolCallProps & React.RefAttributes<HTMLDivElement>>;
|
|
43
|
+
export {};
|
|
@@ -0,0 +1,89 @@
|
|
|
1
|
+
import { jsxs, jsx, Fragment } from "react/jsx-runtime";
|
|
2
|
+
import React, { useId, useState, useCallback } from "react";
|
|
3
|
+
import { Spinner } from "../Spinner/Spinner.js";
|
|
4
|
+
import "./ToolCall.css";
|
|
5
|
+
import "../../fonts/material-symbols.css";
|
|
6
|
+
const DEFAULT_STATUS_LABELS = {
|
|
7
|
+
pending: "Needs approval",
|
|
8
|
+
running: "Running",
|
|
9
|
+
success: "Done",
|
|
10
|
+
error: "Failed"
|
|
11
|
+
};
|
|
12
|
+
const STATUS_ICONS = {
|
|
13
|
+
pending: "pause_circle",
|
|
14
|
+
success: "check_circle",
|
|
15
|
+
error: "error"
|
|
16
|
+
};
|
|
17
|
+
const ToolCall = React.forwardRef(
|
|
18
|
+
({
|
|
19
|
+
name,
|
|
20
|
+
status = "success",
|
|
21
|
+
summary,
|
|
22
|
+
duration,
|
|
23
|
+
statusLabel,
|
|
24
|
+
open,
|
|
25
|
+
defaultOpen = false,
|
|
26
|
+
onOpenChange,
|
|
27
|
+
actions,
|
|
28
|
+
className = "",
|
|
29
|
+
children,
|
|
30
|
+
...rest
|
|
31
|
+
}, ref) => {
|
|
32
|
+
const baseClass = "ds-tool-call";
|
|
33
|
+
const id = useId();
|
|
34
|
+
const panelId = `${id}-panel`;
|
|
35
|
+
const triggerId = `${id}-trigger`;
|
|
36
|
+
const isControlled = open !== void 0;
|
|
37
|
+
const [uncontrolledOpen, setUncontrolledOpen] = useState(defaultOpen);
|
|
38
|
+
const isOpen = isControlled ? open : uncontrolledOpen;
|
|
39
|
+
const hasPanel = Boolean(children);
|
|
40
|
+
const toggle = useCallback(() => {
|
|
41
|
+
const next = !isOpen;
|
|
42
|
+
if (!isControlled) setUncontrolledOpen(next);
|
|
43
|
+
onOpenChange?.(next);
|
|
44
|
+
}, [isOpen, isControlled, onOpenChange]);
|
|
45
|
+
const classes = [
|
|
46
|
+
baseClass,
|
|
47
|
+
`${baseClass}--${status}`,
|
|
48
|
+
isOpen ? `${baseClass}--open` : "",
|
|
49
|
+
className
|
|
50
|
+
].filter(Boolean).join(" ");
|
|
51
|
+
const header = /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
52
|
+
/* @__PURE__ */ jsx("span", { className: `${baseClass}__indicator`, "aria-hidden": "true", children: status === "running" ? /* @__PURE__ */ jsx(Spinner, { size: "sm", variant: "inherit" }) : /* @__PURE__ */ jsx("span", { className: "material-symbols-rounded", children: STATUS_ICONS[status] }) }),
|
|
53
|
+
/* @__PURE__ */ jsx("span", { className: `${baseClass}__name`, children: name }),
|
|
54
|
+
summary && /* @__PURE__ */ jsx("span", { className: `${baseClass}__summary`, children: summary }),
|
|
55
|
+
/* @__PURE__ */ jsx("span", { className: `${baseClass}__status`, children: statusLabel ?? DEFAULT_STATUS_LABELS[status] }),
|
|
56
|
+
duration && /* @__PURE__ */ jsx("span", { className: `${baseClass}__duration`, children: duration }),
|
|
57
|
+
hasPanel && /* @__PURE__ */ jsx("span", { className: `${baseClass}__chevron material-symbols-rounded`, "aria-hidden": "true", children: "expand_more" })
|
|
58
|
+
] });
|
|
59
|
+
return /* @__PURE__ */ jsxs("div", { ...rest, ref, className: classes, children: [
|
|
60
|
+
hasPanel ? /* @__PURE__ */ jsx(
|
|
61
|
+
"button",
|
|
62
|
+
{
|
|
63
|
+
type: "button",
|
|
64
|
+
id: triggerId,
|
|
65
|
+
className: `${baseClass}__header`,
|
|
66
|
+
"aria-expanded": isOpen,
|
|
67
|
+
"aria-controls": panelId,
|
|
68
|
+
onClick: toggle,
|
|
69
|
+
children: header
|
|
70
|
+
}
|
|
71
|
+
) : /* @__PURE__ */ jsx("div", { className: `${baseClass}__header ${baseClass}__header--static`, children: header }),
|
|
72
|
+
hasPanel && /* @__PURE__ */ jsx(
|
|
73
|
+
"div",
|
|
74
|
+
{
|
|
75
|
+
className: `${baseClass}__panel`,
|
|
76
|
+
id: panelId,
|
|
77
|
+
role: "region",
|
|
78
|
+
"aria-labelledby": triggerId,
|
|
79
|
+
children: /* @__PURE__ */ jsx("div", { className: `${baseClass}__content`, children })
|
|
80
|
+
}
|
|
81
|
+
),
|
|
82
|
+
actions && /* @__PURE__ */ jsx("div", { className: `${baseClass}__actions`, children: actions })
|
|
83
|
+
] });
|
|
84
|
+
}
|
|
85
|
+
);
|
|
86
|
+
ToolCall.displayName = "ToolCall";
|
|
87
|
+
export {
|
|
88
|
+
ToolCall
|
|
89
|
+
};
|
package/components/registry.json
CHANGED
|
@@ -2,6 +2,7 @@
|
|
|
2
2
|
"$comment": "SINGLE SOURCE OF TRUTH for the public component count. Every folder in src/components must appear in exactly one of these lists; scripts/validate-component-registry.mjs enforces this at build time. Import COMPONENT_COUNT from src/components/registry.ts wherever a count is displayed - never hardcode the number.",
|
|
3
3
|
"categories": [
|
|
4
4
|
"actions",
|
|
5
|
+
"ai",
|
|
5
6
|
"charts",
|
|
6
7
|
"data-display",
|
|
7
8
|
"feedback",
|
|
@@ -19,6 +20,14 @@
|
|
|
19
20
|
"category": "data-display",
|
|
20
21
|
"client": true
|
|
21
22
|
},
|
|
23
|
+
{
|
|
24
|
+
"name": "AgentStatus",
|
|
25
|
+
"label": "Agent status",
|
|
26
|
+
"slug": "agent-status",
|
|
27
|
+
"description": "A dot-matrix indicator and status line reporting what an agent is doing right now.",
|
|
28
|
+
"category": "ai",
|
|
29
|
+
"client": true
|
|
30
|
+
},
|
|
22
31
|
{
|
|
23
32
|
"name": "Alert",
|
|
24
33
|
"label": "Alert",
|
|
@@ -95,7 +104,7 @@
|
|
|
95
104
|
"name": "Card",
|
|
96
105
|
"label": "Card",
|
|
97
106
|
"slug": "card",
|
|
98
|
-
"description": "Card components for previews, navigation, and token documentation
|
|
107
|
+
"description": "Card components for previews, navigation, and token documentation, from content cards to colour swatches and typography specimens.",
|
|
99
108
|
"category": "data-display",
|
|
100
109
|
"client": true
|
|
101
110
|
},
|
|
@@ -159,7 +168,7 @@
|
|
|
159
168
|
"name": "Combobox",
|
|
160
169
|
"label": "Combobox",
|
|
161
170
|
"slug": "combobox",
|
|
162
|
-
"description": "A filterable select that narrows options as
|
|
171
|
+
"description": "A filterable select that narrows options as the user types, with multi-select chips, grouping, and async loading.",
|
|
163
172
|
"category": "forms",
|
|
164
173
|
"client": true
|
|
165
174
|
},
|
|
@@ -255,7 +264,7 @@
|
|
|
255
264
|
"name": "EmptyState",
|
|
256
265
|
"label": "Empty state",
|
|
257
266
|
"slug": "empty-state",
|
|
258
|
-
"description": "The placeholder for a list, table, or search with nothing to show
|
|
267
|
+
"description": "The placeholder for a list, table, or search with nothing to show: icon, headline, guidance, and a next action.",
|
|
259
268
|
"category": "feedback",
|
|
260
269
|
"client": false
|
|
261
270
|
},
|
|
@@ -263,7 +272,7 @@
|
|
|
263
272
|
"name": "EntityCard",
|
|
264
273
|
"label": "Entity card",
|
|
265
274
|
"slug": "entity-card",
|
|
266
|
-
"description": "Compact display-only card with a centred icon or image and a label
|
|
275
|
+
"description": "Compact display-only card with a centred icon or image and a label, used in the Icons and Logos galleries.",
|
|
267
276
|
"category": "data-display",
|
|
268
277
|
"client": false
|
|
269
278
|
},
|
|
@@ -271,7 +280,7 @@
|
|
|
271
280
|
"name": "Field",
|
|
272
281
|
"label": "Field",
|
|
273
282
|
"slug": "field",
|
|
274
|
-
"description": "The shared scaffolding for labelled form controls
|
|
283
|
+
"description": "The shared scaffolding for labelled form controls: label, required marker, helper and error text, and the ARIA wiring that ties them together.",
|
|
275
284
|
"category": "forms",
|
|
276
285
|
"client": true
|
|
277
286
|
},
|
|
@@ -371,6 +380,14 @@
|
|
|
371
380
|
"category": "forms",
|
|
372
381
|
"client": true
|
|
373
382
|
},
|
|
383
|
+
{
|
|
384
|
+
"name": "Reasoning",
|
|
385
|
+
"label": "Reasoning",
|
|
386
|
+
"slug": "reasoning",
|
|
387
|
+
"description": "A model's thinking, disclosed behind a one-line summary and collapsed once it finishes.",
|
|
388
|
+
"category": "ai",
|
|
389
|
+
"client": true
|
|
390
|
+
},
|
|
374
391
|
{
|
|
375
392
|
"name": "SectionTitle",
|
|
376
393
|
"label": "Section title",
|
|
@@ -407,7 +424,7 @@
|
|
|
407
424
|
"name": "Slider",
|
|
408
425
|
"label": "Slider",
|
|
409
426
|
"slug": "slider",
|
|
410
|
-
"description": "Range input for selecting a value
|
|
427
|
+
"description": "Range input for selecting a value between a minimum and maximum, in default and compact sizes.",
|
|
411
428
|
"category": "forms",
|
|
412
429
|
"client": true
|
|
413
430
|
},
|
|
@@ -463,7 +480,7 @@
|
|
|
463
480
|
"name": "Timeline",
|
|
464
481
|
"label": "Timeline",
|
|
465
482
|
"slug": "timeline",
|
|
466
|
-
"description": "Ordered sequences
|
|
483
|
+
"description": "Ordered sequences: histories and steppers.",
|
|
467
484
|
"category": "data-display",
|
|
468
485
|
"client": false
|
|
469
486
|
},
|
|
@@ -491,6 +508,14 @@
|
|
|
491
508
|
"category": "forms",
|
|
492
509
|
"client": true
|
|
493
510
|
},
|
|
511
|
+
{
|
|
512
|
+
"name": "ToolCall",
|
|
513
|
+
"label": "Tool call",
|
|
514
|
+
"slug": "tool-call",
|
|
515
|
+
"description": "The record of one tool invocation, with its arguments and result behind a disclosure.",
|
|
516
|
+
"category": "ai",
|
|
517
|
+
"client": true
|
|
518
|
+
},
|
|
494
519
|
{
|
|
495
520
|
"name": "Tooltip",
|
|
496
521
|
"label": "Tooltip",
|
|
@@ -2,6 +2,7 @@ declare const _default: {
|
|
|
2
2
|
"$comment": "SINGLE SOURCE OF TRUTH for the public component count. Every folder in src/components must appear in exactly one of these lists; scripts/validate-component-registry.mjs enforces this at build time. Import COMPONENT_COUNT from src/components/registry.ts wherever a count is displayed - never hardcode the number.",
|
|
3
3
|
"categories": [
|
|
4
4
|
"actions",
|
|
5
|
+
"ai",
|
|
5
6
|
"charts",
|
|
6
7
|
"data-display",
|
|
7
8
|
"feedback",
|
|
@@ -19,6 +20,14 @@ declare const _default: {
|
|
|
19
20
|
"category": "data-display",
|
|
20
21
|
"client": true
|
|
21
22
|
},
|
|
23
|
+
{
|
|
24
|
+
"name": "AgentStatus",
|
|
25
|
+
"label": "Agent status",
|
|
26
|
+
"slug": "agent-status",
|
|
27
|
+
"description": "A dot-matrix indicator and status line reporting what an agent is doing right now.",
|
|
28
|
+
"category": "ai",
|
|
29
|
+
"client": true
|
|
30
|
+
},
|
|
22
31
|
{
|
|
23
32
|
"name": "Alert",
|
|
24
33
|
"label": "Alert",
|
|
@@ -95,7 +104,7 @@ declare const _default: {
|
|
|
95
104
|
"name": "Card",
|
|
96
105
|
"label": "Card",
|
|
97
106
|
"slug": "card",
|
|
98
|
-
"description": "Card components for previews, navigation, and token documentation
|
|
107
|
+
"description": "Card components for previews, navigation, and token documentation, from content cards to colour swatches and typography specimens.",
|
|
99
108
|
"category": "data-display",
|
|
100
109
|
"client": true
|
|
101
110
|
},
|
|
@@ -159,7 +168,7 @@ declare const _default: {
|
|
|
159
168
|
"name": "Combobox",
|
|
160
169
|
"label": "Combobox",
|
|
161
170
|
"slug": "combobox",
|
|
162
|
-
"description": "A filterable select that narrows options as
|
|
171
|
+
"description": "A filterable select that narrows options as the user types, with multi-select chips, grouping, and async loading.",
|
|
163
172
|
"category": "forms",
|
|
164
173
|
"client": true
|
|
165
174
|
},
|
|
@@ -255,7 +264,7 @@ declare const _default: {
|
|
|
255
264
|
"name": "EmptyState",
|
|
256
265
|
"label": "Empty state",
|
|
257
266
|
"slug": "empty-state",
|
|
258
|
-
"description": "The placeholder for a list, table, or search with nothing to show
|
|
267
|
+
"description": "The placeholder for a list, table, or search with nothing to show: icon, headline, guidance, and a next action.",
|
|
259
268
|
"category": "feedback",
|
|
260
269
|
"client": false
|
|
261
270
|
},
|
|
@@ -263,7 +272,7 @@ declare const _default: {
|
|
|
263
272
|
"name": "EntityCard",
|
|
264
273
|
"label": "Entity card",
|
|
265
274
|
"slug": "entity-card",
|
|
266
|
-
"description": "Compact display-only card with a centred icon or image and a label
|
|
275
|
+
"description": "Compact display-only card with a centred icon or image and a label, used in the Icons and Logos galleries.",
|
|
267
276
|
"category": "data-display",
|
|
268
277
|
"client": false
|
|
269
278
|
},
|
|
@@ -271,7 +280,7 @@ declare const _default: {
|
|
|
271
280
|
"name": "Field",
|
|
272
281
|
"label": "Field",
|
|
273
282
|
"slug": "field",
|
|
274
|
-
"description": "The shared scaffolding for labelled form controls
|
|
283
|
+
"description": "The shared scaffolding for labelled form controls: label, required marker, helper and error text, and the ARIA wiring that ties them together.",
|
|
275
284
|
"category": "forms",
|
|
276
285
|
"client": true
|
|
277
286
|
},
|
|
@@ -371,6 +380,14 @@ declare const _default: {
|
|
|
371
380
|
"category": "forms",
|
|
372
381
|
"client": true
|
|
373
382
|
},
|
|
383
|
+
{
|
|
384
|
+
"name": "Reasoning",
|
|
385
|
+
"label": "Reasoning",
|
|
386
|
+
"slug": "reasoning",
|
|
387
|
+
"description": "A model's thinking, disclosed behind a one-line summary and collapsed once it finishes.",
|
|
388
|
+
"category": "ai",
|
|
389
|
+
"client": true
|
|
390
|
+
},
|
|
374
391
|
{
|
|
375
392
|
"name": "SectionTitle",
|
|
376
393
|
"label": "Section title",
|
|
@@ -407,7 +424,7 @@ declare const _default: {
|
|
|
407
424
|
"name": "Slider",
|
|
408
425
|
"label": "Slider",
|
|
409
426
|
"slug": "slider",
|
|
410
|
-
"description": "Range input for selecting a value
|
|
427
|
+
"description": "Range input for selecting a value between a minimum and maximum, in default and compact sizes.",
|
|
411
428
|
"category": "forms",
|
|
412
429
|
"client": true
|
|
413
430
|
},
|
|
@@ -463,7 +480,7 @@ declare const _default: {
|
|
|
463
480
|
"name": "Timeline",
|
|
464
481
|
"label": "Timeline",
|
|
465
482
|
"slug": "timeline",
|
|
466
|
-
"description": "Ordered sequences
|
|
483
|
+
"description": "Ordered sequences: histories and steppers.",
|
|
467
484
|
"category": "data-display",
|
|
468
485
|
"client": false
|
|
469
486
|
},
|
|
@@ -491,6 +508,14 @@ declare const _default: {
|
|
|
491
508
|
"category": "forms",
|
|
492
509
|
"client": true
|
|
493
510
|
},
|
|
511
|
+
{
|
|
512
|
+
"name": "ToolCall",
|
|
513
|
+
"label": "Tool call",
|
|
514
|
+
"slug": "tool-call",
|
|
515
|
+
"description": "The record of one tool invocation, with its arguments and result behind a disclosure.",
|
|
516
|
+
"category": "ai",
|
|
517
|
+
"client": true
|
|
518
|
+
},
|
|
494
519
|
{
|
|
495
520
|
"name": "Tooltip",
|
|
496
521
|
"label": "Tooltip",
|