@gridui/task 1.0.11 → 1.2.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 +69 -3
- package/dist/index.d.ts +7 -0
- package/dist/index.js +119 -2
- package/dist/index.js.map +4 -4
- package/dist/shared/tool-call-context.d.ts +21 -0
- package/dist/styled.js +4 -0
- package/dist/styles.css +557 -3
- package/dist/styles.local.css +166 -0
- package/dist/tool-call/tool-call.d.ts +20 -0
- package/dist/tool-call-details/tool-call-details.d.ts +9 -0
- package/dist/tool-call-summary/tool-call-summary.d.ts +14 -0
- package/docs/catalog.json +45 -4
- package/docs/reference/README.md +3 -0
- package/docs/reference/tool-call-details.md +57 -0
- package/docs/reference/tool-call-summary.md +65 -0
- package/docs/reference/tool-call.md +97 -0
- package/package.json +13 -7
|
@@ -0,0 +1,166 @@
|
|
|
1
|
+
/*! tailwindcss v4.3.5 | MIT License | https://tailwindcss.com */
|
|
2
|
+
@layer properties;
|
|
3
|
+
@layer theme, base, components, utilities;
|
|
4
|
+
@layer theme {
|
|
5
|
+
:root, :host {
|
|
6
|
+
--spacing: 0.25rem;
|
|
7
|
+
--font-weight-medium: 500;
|
|
8
|
+
}
|
|
9
|
+
}
|
|
10
|
+
@layer utilities {
|
|
11
|
+
.gridui-u-task--m-0 {
|
|
12
|
+
margin: 0px;
|
|
13
|
+
}
|
|
14
|
+
.gridui-u-task--my-gridui-8 {
|
|
15
|
+
margin-block: var(--gridui-space-8);
|
|
16
|
+
}
|
|
17
|
+
.gridui-u-task--mt-gridui-16 {
|
|
18
|
+
margin-top: var(--gridui-space-16);
|
|
19
|
+
}
|
|
20
|
+
.gridui-u-task--flex {
|
|
21
|
+
display: flex;
|
|
22
|
+
}
|
|
23
|
+
.gridui-u-task--min-h-0 {
|
|
24
|
+
min-height: 0px;
|
|
25
|
+
}
|
|
26
|
+
.gridui-u-task--min-h-11 {
|
|
27
|
+
min-height: calc(var(--spacing) * 11);
|
|
28
|
+
}
|
|
29
|
+
.gridui-u-task--min-w-0 {
|
|
30
|
+
min-width: 0px;
|
|
31
|
+
}
|
|
32
|
+
.gridui-u-task--cursor-pointer {
|
|
33
|
+
cursor: pointer;
|
|
34
|
+
}
|
|
35
|
+
.gridui-u-task--list-decimal {
|
|
36
|
+
list-style-type: decimal;
|
|
37
|
+
}
|
|
38
|
+
.gridui-u-task--flex-col {
|
|
39
|
+
flex-direction: column;
|
|
40
|
+
}
|
|
41
|
+
.gridui-u-task--flex-wrap {
|
|
42
|
+
flex-wrap: wrap;
|
|
43
|
+
}
|
|
44
|
+
.gridui-u-task--items-baseline {
|
|
45
|
+
align-items: baseline;
|
|
46
|
+
}
|
|
47
|
+
.gridui-u-task--items-center {
|
|
48
|
+
align-items: center;
|
|
49
|
+
}
|
|
50
|
+
.gridui-u-task--justify-between {
|
|
51
|
+
justify-content: space-between;
|
|
52
|
+
}
|
|
53
|
+
.gridui-u-task--justify-end {
|
|
54
|
+
justify-content: flex-end;
|
|
55
|
+
}
|
|
56
|
+
.gridui-u-task--gap-gridui-8 {
|
|
57
|
+
gap: var(--gridui-space-8);
|
|
58
|
+
}
|
|
59
|
+
.gridui-u-task--border {
|
|
60
|
+
border-style: var(--tw-border-style);
|
|
61
|
+
border-width: 1px;
|
|
62
|
+
}
|
|
63
|
+
.gridui-u-task--border-0 {
|
|
64
|
+
border-style: var(--tw-border-style);
|
|
65
|
+
border-width: 0px;
|
|
66
|
+
}
|
|
67
|
+
.gridui-u-task--border-b {
|
|
68
|
+
border-bottom-style: var(--tw-border-style);
|
|
69
|
+
border-bottom-width: 1px;
|
|
70
|
+
}
|
|
71
|
+
.gridui-u-task--border-border {
|
|
72
|
+
border-color: var(--gridui-border);
|
|
73
|
+
}
|
|
74
|
+
.gridui-u-task--bg-background {
|
|
75
|
+
background-color: var(--gridui-background);
|
|
76
|
+
}
|
|
77
|
+
.gridui-u-task--bg-transparent {
|
|
78
|
+
background-color: transparent;
|
|
79
|
+
}
|
|
80
|
+
.gridui-u-task--p-0 {
|
|
81
|
+
padding: 0px;
|
|
82
|
+
}
|
|
83
|
+
.gridui-u-task--p-gridui-16 {
|
|
84
|
+
padding: var(--gridui-space-16);
|
|
85
|
+
}
|
|
86
|
+
.gridui-u-task--py-gridui-16 {
|
|
87
|
+
padding-block: var(--gridui-space-16);
|
|
88
|
+
}
|
|
89
|
+
.gridui-u-task--ps-gridui-32 {
|
|
90
|
+
padding-inline-start: var(--gridui-space-32);
|
|
91
|
+
}
|
|
92
|
+
.gridui-u-task--pe-gridui-16 {
|
|
93
|
+
padding-inline-end: var(--gridui-space-16);
|
|
94
|
+
}
|
|
95
|
+
.gridui-u-task--text-start {
|
|
96
|
+
text-align: start;
|
|
97
|
+
}
|
|
98
|
+
.gridui-u-task--type-body {
|
|
99
|
+
font: var(--gridui-type-body);
|
|
100
|
+
font-family: var(--gridui-font-body);
|
|
101
|
+
letter-spacing: normal;
|
|
102
|
+
}
|
|
103
|
+
.gridui-u-task--type-caption {
|
|
104
|
+
font: var(--gridui-type-caption);
|
|
105
|
+
font-family: var(--gridui-font-body);
|
|
106
|
+
letter-spacing: normal;
|
|
107
|
+
}
|
|
108
|
+
.gridui-u-task--font-medium {
|
|
109
|
+
--tw-font-weight: var(--font-weight-medium);
|
|
110
|
+
font-weight: var(--font-weight-medium);
|
|
111
|
+
}
|
|
112
|
+
.gridui-u-task--wrap-anywhere {
|
|
113
|
+
overflow-wrap: anywhere;
|
|
114
|
+
}
|
|
115
|
+
.gridui-u-task--text-foreground {
|
|
116
|
+
color: var(--gridui-foreground);
|
|
117
|
+
}
|
|
118
|
+
.gridui-u-task--text-inherit {
|
|
119
|
+
color: inherit;
|
|
120
|
+
}
|
|
121
|
+
.gridui-u-task--text-muted {
|
|
122
|
+
color: var(--gridui-muted);
|
|
123
|
+
}
|
|
124
|
+
.gridui-u-task--text-status-danger-text {
|
|
125
|
+
color: var(--gridui-status-danger-text);
|
|
126
|
+
}
|
|
127
|
+
}
|
|
128
|
+
@layer components {
|
|
129
|
+
.gridui-tool-call-trigger {
|
|
130
|
+
font: inherit;
|
|
131
|
+
}
|
|
132
|
+
.gridui-tool-call-chevron {
|
|
133
|
+
inline-size: 0.375rem;
|
|
134
|
+
block-size: 0.375rem;
|
|
135
|
+
flex: none;
|
|
136
|
+
border-block-start: 1px solid currentColor;
|
|
137
|
+
border-inline-end: 1px solid currentColor;
|
|
138
|
+
rotate: 45deg;
|
|
139
|
+
}
|
|
140
|
+
.gridui-tool-call-trigger:dir(rtl) .gridui-tool-call-chevron {
|
|
141
|
+
rotate: -135deg;
|
|
142
|
+
}
|
|
143
|
+
.gridui-tool-call-trigger[aria-expanded="true"] .gridui-tool-call-chevron {
|
|
144
|
+
rotate: 135deg;
|
|
145
|
+
}
|
|
146
|
+
.gridui-tool-call-details[hidden] {
|
|
147
|
+
display: none !important;
|
|
148
|
+
}
|
|
149
|
+
}
|
|
150
|
+
@property --tw-border-style {
|
|
151
|
+
syntax: "*";
|
|
152
|
+
inherits: false;
|
|
153
|
+
initial-value: solid;
|
|
154
|
+
}
|
|
155
|
+
@property --tw-font-weight {
|
|
156
|
+
syntax: "*";
|
|
157
|
+
inherits: false;
|
|
158
|
+
}
|
|
159
|
+
@layer properties {
|
|
160
|
+
@supports ((-webkit-hyphens: none) and (not (margin-trim: block))) or ((-moz-orient: inline) and (not (color:rgb(from red r g b)))) {
|
|
161
|
+
*, ::before, ::after, ::backdrop {
|
|
162
|
+
--tw-border-style: solid;
|
|
163
|
+
--tw-font-weight: initial;
|
|
164
|
+
}
|
|
165
|
+
}
|
|
166
|
+
}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @author WMXPY
|
|
3
|
+
* @package Task
|
|
4
|
+
* @namespace ToolCall
|
|
5
|
+
* @description Tool Call
|
|
6
|
+
*/
|
|
7
|
+
import { type ToolCallStatus } from "../shared/tool-call-context";
|
|
8
|
+
import { type ComponentPropsWithRef, type FC, type ReactNode } from "react";
|
|
9
|
+
export type ToolCallProps = Omit<ComponentPropsWithRef<"div">, "title" | "children"> & {
|
|
10
|
+
readonly title: string;
|
|
11
|
+
readonly status: ToolCallStatus;
|
|
12
|
+
readonly statusLabel: string;
|
|
13
|
+
readonly description?: ReactNode;
|
|
14
|
+
readonly durationLabel?: string;
|
|
15
|
+
readonly open?: boolean;
|
|
16
|
+
readonly defaultOpen?: boolean;
|
|
17
|
+
readonly onOpenChange?: (open: boolean) => void;
|
|
18
|
+
readonly children: ReactNode;
|
|
19
|
+
};
|
|
20
|
+
export declare const ToolCall: FC<ToolCallProps>;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @author WMXPY
|
|
3
|
+
* @package Task
|
|
4
|
+
* @namespace ToolCallDetails
|
|
5
|
+
* @description Tool Call Details
|
|
6
|
+
*/
|
|
7
|
+
import type { ComponentPropsWithRef, FC } from "react";
|
|
8
|
+
export type ToolCallDetailsProps = Omit<ComponentPropsWithRef<"div">, "id" | "hidden" | "aria-labelledby" | "aria-busy">;
|
|
9
|
+
export declare const ToolCallDetails: FC<ToolCallDetailsProps>;
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @author WMXPY
|
|
3
|
+
* @package Task
|
|
4
|
+
* @namespace ToolCallSummary
|
|
5
|
+
* @description Tool Call Summary
|
|
6
|
+
*/
|
|
7
|
+
import type { ComponentPropsWithRef, FC, ReactNode } from "react";
|
|
8
|
+
export type ToolCallSummaryProps = Omit<ComponentPropsWithRef<"div">, "children"> & {
|
|
9
|
+
/** Use a static title when details are always visible. */
|
|
10
|
+
readonly collapsible?: boolean;
|
|
11
|
+
/** Actions stay outside the disclosure button. The host owns their availability. */
|
|
12
|
+
readonly actions?: ReactNode;
|
|
13
|
+
};
|
|
14
|
+
export declare const ToolCallSummary: FC<ToolCallSummaryProps>;
|
package/docs/catalog.json
CHANGED
|
@@ -1,15 +1,18 @@
|
|
|
1
1
|
{
|
|
2
2
|
"schemaVersion": 1,
|
|
3
3
|
"name": "@gridui/task",
|
|
4
|
-
"version": "1.0
|
|
4
|
+
"version": "1.2.0",
|
|
5
5
|
"category": "dashboard",
|
|
6
6
|
"description": "GridUI React task",
|
|
7
|
-
"usage": "TaskTimeline detail rows and settled ApprovalPanel records compose the public Disclosure.
|
|
7
|
+
"usage": "TaskTimeline detail rows and settled ApprovalPanel records compose the public Disclosure. Disclosure styles are included in Task styles. Native summary focus, keyboard interaction, and retained server-rendered context stay with Disclosure; Task owns decision state, callbacks, and dense spacing.",
|
|
8
8
|
"documentation": [
|
|
9
9
|
"README.md",
|
|
10
10
|
"docs/reference/README.md",
|
|
11
11
|
"docs/reference/approval-panel.md",
|
|
12
|
-
"docs/reference/task-timeline.md"
|
|
12
|
+
"docs/reference/task-timeline.md",
|
|
13
|
+
"docs/reference/tool-call-details.md",
|
|
14
|
+
"docs/reference/tool-call-summary.md",
|
|
15
|
+
"docs/reference/tool-call.md"
|
|
13
16
|
],
|
|
14
17
|
"exports": [
|
|
15
18
|
{
|
|
@@ -36,6 +39,41 @@
|
|
|
36
39
|
"name": "TaskTimelineProps",
|
|
37
40
|
"kind": "type",
|
|
38
41
|
"importPath": "@gridui/task"
|
|
42
|
+
},
|
|
43
|
+
{
|
|
44
|
+
"name": "ToolCall",
|
|
45
|
+
"kind": "component",
|
|
46
|
+
"importPath": "@gridui/task"
|
|
47
|
+
},
|
|
48
|
+
{
|
|
49
|
+
"name": "ToolCallDetails",
|
|
50
|
+
"kind": "component",
|
|
51
|
+
"importPath": "@gridui/task"
|
|
52
|
+
},
|
|
53
|
+
{
|
|
54
|
+
"name": "ToolCallDetailsProps",
|
|
55
|
+
"kind": "type",
|
|
56
|
+
"importPath": "@gridui/task"
|
|
57
|
+
},
|
|
58
|
+
{
|
|
59
|
+
"name": "ToolCallProps",
|
|
60
|
+
"kind": "type",
|
|
61
|
+
"importPath": "@gridui/task"
|
|
62
|
+
},
|
|
63
|
+
{
|
|
64
|
+
"name": "ToolCallStatus",
|
|
65
|
+
"kind": "type",
|
|
66
|
+
"importPath": "@gridui/task"
|
|
67
|
+
},
|
|
68
|
+
{
|
|
69
|
+
"name": "ToolCallSummary",
|
|
70
|
+
"kind": "component",
|
|
71
|
+
"importPath": "@gridui/task"
|
|
72
|
+
},
|
|
73
|
+
{
|
|
74
|
+
"name": "ToolCallSummaryProps",
|
|
75
|
+
"kind": "type",
|
|
76
|
+
"importPath": "@gridui/task"
|
|
39
77
|
}
|
|
40
78
|
],
|
|
41
79
|
"styles": [
|
|
@@ -44,11 +82,14 @@
|
|
|
44
82
|
"@gridui/disclosure/styles.css",
|
|
45
83
|
"@gridui/task/styles.css"
|
|
46
84
|
],
|
|
85
|
+
"styledImport": "@gridui/task/styled",
|
|
47
86
|
"examples": [
|
|
48
87
|
"https://github.com/sudo-ui/GridUI-React-Monorepo/blob/main/packages-dashboard/task/stories/approvals.mdx",
|
|
49
88
|
"https://github.com/sudo-ui/GridUI-React-Monorepo/blob/main/packages-dashboard/task/stories/getting-started.mdx",
|
|
50
89
|
"https://github.com/sudo-ui/GridUI-React-Monorepo/blob/main/packages-dashboard/task/stories/timeline.mdx",
|
|
90
|
+
"https://github.com/sudo-ui/GridUI-React-Monorepo/blob/main/packages-dashboard/task/stories/tool-calls.mdx",
|
|
51
91
|
"https://github.com/sudo-ui/GridUI-React-Monorepo/blob/main/packages-dashboard/task/stories/approval-panel.stories.tsx",
|
|
52
|
-
"https://github.com/sudo-ui/GridUI-React-Monorepo/blob/main/packages-dashboard/task/stories/task-timeline.stories.tsx"
|
|
92
|
+
"https://github.com/sudo-ui/GridUI-React-Monorepo/blob/main/packages-dashboard/task/stories/task-timeline.stories.tsx",
|
|
93
|
+
"https://github.com/sudo-ui/GridUI-React-Monorepo/blob/main/packages-dashboard/task/stories/tool-call.stories.tsx"
|
|
53
94
|
]
|
|
54
95
|
}
|
package/docs/reference/README.md
CHANGED
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
<!-- Generated from public Props and owned stories. Run pnpm docs:storybook. -->
|
|
2
|
+
# ToolCallDetails
|
|
3
|
+
|
|
4
|
+
Compose ToolCallDetails with ToolCall inside the same @gridui/task component family.
|
|
5
|
+
|
|
6
|
+
Import from ``@gridui/task`` and load Theme before this family's stylesheet.
|
|
7
|
+
|
|
8
|
+
```tsx
|
|
9
|
+
import { ToolCallDetails } from "@gridui/task";
|
|
10
|
+
import "@gridui/theme/styles.css";
|
|
11
|
+
import "@gridui/task/styles.css";
|
|
12
|
+
```
|
|
13
|
+
|
|
14
|
+
Read the [package contract](https://github.com/sudo-ui/GridUI-React-Monorepo/blob/main/packages-dashboard/task/README.md) for shared behavior and stylesheet dependencies.
|
|
15
|
+
|
|
16
|
+
The [working composition](https://github.com/sudo-ui/GridUI-React-Monorepo/blob/main/packages-dashboard/task/stories/tool-call.stories.tsx) demonstrates required context, state, and related components. Use View code in Storybook to inspect the actual implementation.
|
|
17
|
+
|
|
18
|
+
## API
|
|
19
|
+
|
|
20
|
+
The public Props type is the source of these signatures. Defaults below are explicit implementation defaults; story presets are separate. Native attributes remain available through the exported Props type.
|
|
21
|
+
|
|
22
|
+
### children
|
|
23
|
+
|
|
24
|
+
``ReactNode`` · Optional
|
|
25
|
+
|
|
26
|
+
Content rendered inside the component.
|
|
27
|
+
|
|
28
|
+
### onFocus
|
|
29
|
+
|
|
30
|
+
``(event: FocusEvent<HTMLDivElement, Element>): void`` · Optional
|
|
31
|
+
|
|
32
|
+
Called when the corresponding interaction occurs; inspect the arguments in Actions.
|
|
33
|
+
|
|
34
|
+
### onBlur
|
|
35
|
+
|
|
36
|
+
``(event: FocusEvent<HTMLDivElement, Element>): void`` · Optional
|
|
37
|
+
|
|
38
|
+
Called when the corresponding interaction occurs; inspect the arguments in Actions.
|
|
39
|
+
|
|
40
|
+
### onChange
|
|
41
|
+
|
|
42
|
+
``(event: ChangeEvent<HTMLDivElement, Element>): void`` · Optional
|
|
43
|
+
|
|
44
|
+
Called when the corresponding interaction occurs; inspect the arguments in Actions.
|
|
45
|
+
|
|
46
|
+
### onSubmit
|
|
47
|
+
|
|
48
|
+
``(event: SubmitEvent<HTMLDivElement>): void`` · Optional
|
|
49
|
+
|
|
50
|
+
Called when the corresponding interaction occurs; inspect the arguments in Actions.
|
|
51
|
+
|
|
52
|
+
### onClick
|
|
53
|
+
|
|
54
|
+
``(event: MouseEvent<HTMLDivElement, MouseEvent>): void`` · Optional
|
|
55
|
+
|
|
56
|
+
Called when the corresponding interaction occurs; inspect the arguments in Actions.
|
|
57
|
+
|
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
<!-- Generated from public Props and owned stories. Run pnpm docs:storybook. -->
|
|
2
|
+
# ToolCallSummary
|
|
3
|
+
|
|
4
|
+
Compose ToolCallSummary with ToolCall inside the same @gridui/task component family.
|
|
5
|
+
|
|
6
|
+
Import from ``@gridui/task`` and load Theme before this family's stylesheet.
|
|
7
|
+
|
|
8
|
+
```tsx
|
|
9
|
+
import { ToolCallSummary } from "@gridui/task";
|
|
10
|
+
import "@gridui/theme/styles.css";
|
|
11
|
+
import "@gridui/task/styles.css";
|
|
12
|
+
```
|
|
13
|
+
|
|
14
|
+
Read the [package contract](https://github.com/sudo-ui/GridUI-React-Monorepo/blob/main/packages-dashboard/task/README.md) for shared behavior and stylesheet dependencies.
|
|
15
|
+
|
|
16
|
+
The [working composition](https://github.com/sudo-ui/GridUI-React-Monorepo/blob/main/packages-dashboard/task/stories/tool-call.stories.tsx) demonstrates required context, state, and related components. Use View code in Storybook to inspect the actual implementation.
|
|
17
|
+
|
|
18
|
+
## API
|
|
19
|
+
|
|
20
|
+
The public Props type is the source of these signatures. Defaults below are explicit implementation defaults; story presets are separate. Native attributes remain available through the exported Props type.
|
|
21
|
+
|
|
22
|
+
### onFocus
|
|
23
|
+
|
|
24
|
+
``(event: FocusEvent<HTMLDivElement, Element>): void`` · Optional
|
|
25
|
+
|
|
26
|
+
Called when the corresponding interaction occurs; inspect the arguments in Actions.
|
|
27
|
+
|
|
28
|
+
### onBlur
|
|
29
|
+
|
|
30
|
+
``(event: FocusEvent<HTMLDivElement, Element>): void`` · Optional
|
|
31
|
+
|
|
32
|
+
Called when the corresponding interaction occurs; inspect the arguments in Actions.
|
|
33
|
+
|
|
34
|
+
### onChange
|
|
35
|
+
|
|
36
|
+
``(event: ChangeEvent<HTMLDivElement, Element>): void`` · Optional
|
|
37
|
+
|
|
38
|
+
Called when the corresponding interaction occurs; inspect the arguments in Actions.
|
|
39
|
+
|
|
40
|
+
### onSubmit
|
|
41
|
+
|
|
42
|
+
``(event: SubmitEvent<HTMLDivElement>): void`` · Optional
|
|
43
|
+
|
|
44
|
+
Called when the corresponding interaction occurs; inspect the arguments in Actions.
|
|
45
|
+
|
|
46
|
+
### onClick
|
|
47
|
+
|
|
48
|
+
``(event: MouseEvent<HTMLDivElement, MouseEvent>): void`` · Optional
|
|
49
|
+
|
|
50
|
+
Called when the corresponding interaction occurs; inspect the arguments in Actions.
|
|
51
|
+
|
|
52
|
+
### collapsible
|
|
53
|
+
|
|
54
|
+
``boolean | undefined`` · Optional
|
|
55
|
+
|
|
56
|
+
Default: ``true``
|
|
57
|
+
|
|
58
|
+
Use a static title when details are always visible.
|
|
59
|
+
|
|
60
|
+
### actions
|
|
61
|
+
|
|
62
|
+
``ReactNode`` · Optional
|
|
63
|
+
|
|
64
|
+
Actions stay outside the disclosure button. The host owns their availability.
|
|
65
|
+
|
|
@@ -0,0 +1,97 @@
|
|
|
1
|
+
<!-- Generated from public Props and owned stories. Run pnpm docs:storybook. -->
|
|
2
|
+
# ToolCall
|
|
3
|
+
|
|
4
|
+
Presents one tool invocation with a localized status and retained details. Grid owns padding, seams, and placement; the application owns execution and recovery.
|
|
5
|
+
|
|
6
|
+
Import from ``@gridui/task`` and load Theme before this family's stylesheet.
|
|
7
|
+
|
|
8
|
+
```tsx
|
|
9
|
+
import { ToolCall } from "@gridui/task";
|
|
10
|
+
import "@gridui/theme/styles.css";
|
|
11
|
+
import "@gridui/task/styles.css";
|
|
12
|
+
```
|
|
13
|
+
|
|
14
|
+
Read the [package contract](https://github.com/sudo-ui/GridUI-React-Monorepo/blob/main/packages-dashboard/task/README.md) for shared behavior and stylesheet dependencies.
|
|
15
|
+
|
|
16
|
+
The [working composition](https://github.com/sudo-ui/GridUI-React-Monorepo/blob/main/packages-dashboard/task/stories/tool-call.stories.tsx) demonstrates required context, state, and related components. Use View code in Storybook to inspect the actual implementation.
|
|
17
|
+
|
|
18
|
+
## API
|
|
19
|
+
|
|
20
|
+
The public Props type is the source of these signatures. Defaults below are explicit implementation defaults; story presets are separate. Native attributes remain available through the exported Props type.
|
|
21
|
+
|
|
22
|
+
### onFocus
|
|
23
|
+
|
|
24
|
+
``(event: FocusEvent<HTMLDivElement, Element>): void`` · Optional
|
|
25
|
+
|
|
26
|
+
Called when the corresponding interaction occurs; inspect the arguments in Actions.
|
|
27
|
+
|
|
28
|
+
### onBlur
|
|
29
|
+
|
|
30
|
+
``(event: FocusEvent<HTMLDivElement, Element>): void`` · Optional
|
|
31
|
+
|
|
32
|
+
Called when the corresponding interaction occurs; inspect the arguments in Actions.
|
|
33
|
+
|
|
34
|
+
### onChange
|
|
35
|
+
|
|
36
|
+
``(event: ChangeEvent<HTMLDivElement, Element>): void`` · Optional
|
|
37
|
+
|
|
38
|
+
Called when the corresponding interaction occurs; inspect the arguments in Actions.
|
|
39
|
+
|
|
40
|
+
### onSubmit
|
|
41
|
+
|
|
42
|
+
``(event: SubmitEvent<HTMLDivElement>): void`` · Optional
|
|
43
|
+
|
|
44
|
+
Called when the corresponding interaction occurs; inspect the arguments in Actions.
|
|
45
|
+
|
|
46
|
+
### onClick
|
|
47
|
+
|
|
48
|
+
``(event: MouseEvent<HTMLDivElement, MouseEvent>): void`` · Optional
|
|
49
|
+
|
|
50
|
+
Called when the corresponding interaction occurs; inspect the arguments in Actions.
|
|
51
|
+
|
|
52
|
+
### title
|
|
53
|
+
|
|
54
|
+
``string`` · Required
|
|
55
|
+
|
|
56
|
+
### status
|
|
57
|
+
|
|
58
|
+
``ToolCallStatus`` · Required
|
|
59
|
+
|
|
60
|
+
### statusLabel
|
|
61
|
+
|
|
62
|
+
``string`` · Required
|
|
63
|
+
|
|
64
|
+
### description
|
|
65
|
+
|
|
66
|
+
``ReactNode`` · Optional
|
|
67
|
+
|
|
68
|
+
### durationLabel
|
|
69
|
+
|
|
70
|
+
``string | undefined`` · Optional
|
|
71
|
+
|
|
72
|
+
### open
|
|
73
|
+
|
|
74
|
+
``boolean | undefined`` · Optional
|
|
75
|
+
|
|
76
|
+
Controlled visibility. Pair with onOpenChange.
|
|
77
|
+
|
|
78
|
+
### defaultOpen
|
|
79
|
+
|
|
80
|
+
``boolean | undefined`` · Optional
|
|
81
|
+
|
|
82
|
+
Default: ``false``
|
|
83
|
+
|
|
84
|
+
Initial uncontrolled visibility. Reset the story after changing it.
|
|
85
|
+
|
|
86
|
+
### onOpenChange
|
|
87
|
+
|
|
88
|
+
``(open: boolean): void`` · Optional
|
|
89
|
+
|
|
90
|
+
Called when the corresponding interaction occurs; inspect the arguments in Actions.
|
|
91
|
+
|
|
92
|
+
### children
|
|
93
|
+
|
|
94
|
+
``ReactNode`` · Required
|
|
95
|
+
|
|
96
|
+
Content rendered inside the component.
|
|
97
|
+
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@gridui/task",
|
|
3
|
-
"version": "1.0
|
|
3
|
+
"version": "1.2.0",
|
|
4
4
|
"description": "GridUI React task",
|
|
5
5
|
"license": "UNLICENSED",
|
|
6
6
|
"type": "module",
|
|
@@ -10,14 +10,19 @@
|
|
|
10
10
|
"docs"
|
|
11
11
|
],
|
|
12
12
|
"sideEffects": [
|
|
13
|
-
"**/*.css"
|
|
13
|
+
"**/*.css",
|
|
14
|
+
"./dist/styled.js"
|
|
14
15
|
],
|
|
15
16
|
"exports": {
|
|
16
17
|
".": {
|
|
17
18
|
"types": "./dist/index.d.ts",
|
|
18
19
|
"import": "./dist/index.js"
|
|
19
20
|
},
|
|
20
|
-
"./styles.css": "./dist/styles.css"
|
|
21
|
+
"./styles.css": "./dist/styles.css",
|
|
22
|
+
"./styled": {
|
|
23
|
+
"types": "./dist/index.d.ts",
|
|
24
|
+
"import": "./dist/styled.js"
|
|
25
|
+
}
|
|
21
26
|
},
|
|
22
27
|
"publishConfig": {
|
|
23
28
|
"access": "public"
|
|
@@ -27,15 +32,16 @@
|
|
|
27
32
|
"react-dom": "^19.2.0"
|
|
28
33
|
},
|
|
29
34
|
"dependencies": {
|
|
30
|
-
"@gridui/button": "^5.0
|
|
31
|
-
"@gridui/disclosure": "^2.
|
|
35
|
+
"@gridui/button": "^5.2.0",
|
|
36
|
+
"@gridui/disclosure": "^2.1.0",
|
|
32
37
|
"@gridui/style-utils": "^4.0.0",
|
|
33
|
-
"@gridui/theme": "^
|
|
38
|
+
"@gridui/theme": "^4.0.0",
|
|
34
39
|
"class-variance-authority": "0.7.1"
|
|
35
40
|
},
|
|
36
41
|
"devDependencies": {
|
|
37
42
|
"@gridui-internal/configuration": "0.0.0-internal",
|
|
38
|
-
"@gridui/code-view": "1.0
|
|
43
|
+
"@gridui/code-view": "1.1.0",
|
|
44
|
+
"@gridui/grid": "3.2.0",
|
|
39
45
|
"@jest/globals": "30.5.2",
|
|
40
46
|
"@storybook/react-vite": "10.6.7",
|
|
41
47
|
"@types/jest": "30.0.0",
|