@gridui/task 1.0.8 → 1.0.9
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 +2 -0
- package/docs/catalog.json +7 -2
- package/docs/reference/README.md +5 -0
- package/docs/reference/approval-panel.md +103 -0
- package/docs/reference/task-timeline.md +67 -0
- package/package.json +5 -5
package/README.md
CHANGED
|
@@ -14,3 +14,5 @@ with Disclosure; Task owns decision state, callbacks, and dense spacing.
|
|
|
14
14
|
|
|
15
15
|
TaskTimeline rows share the palette’s structural border color in every state.
|
|
16
16
|
Failed steps emphasize their status label with the danger foreground color.
|
|
17
|
+
|
|
18
|
+
[Component reference](docs/reference/README.md) contains focused API pages for each public component.
|
package/docs/catalog.json
CHANGED
|
@@ -1,12 +1,15 @@
|
|
|
1
1
|
{
|
|
2
2
|
"schemaVersion": 1,
|
|
3
3
|
"name": "@gridui/task",
|
|
4
|
-
"version": "1.0.
|
|
4
|
+
"version": "1.0.9",
|
|
5
5
|
"category": "dashboard",
|
|
6
6
|
"description": "GridUI React task",
|
|
7
7
|
"usage": "TaskTimeline detail rows and settled ApprovalPanel records compose the public Disclosure. Load `@gridui/disclosure/styles.css` before 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
|
-
"README.md"
|
|
9
|
+
"README.md",
|
|
10
|
+
"docs/reference/README.md",
|
|
11
|
+
"docs/reference/approval-panel.md",
|
|
12
|
+
"docs/reference/task-timeline.md"
|
|
10
13
|
],
|
|
11
14
|
"exports": [
|
|
12
15
|
{
|
|
@@ -42,6 +45,8 @@
|
|
|
42
45
|
"@gridui/task/styles.css"
|
|
43
46
|
],
|
|
44
47
|
"examples": [
|
|
48
|
+
"https://github.com/sudo-ui/GridUI-React-Monorepo/blob/main/packages-dashboard/task/stories/approvals.mdx",
|
|
49
|
+
"https://github.com/sudo-ui/GridUI-React-Monorepo/blob/main/packages-dashboard/task/stories/timeline.mdx",
|
|
45
50
|
"https://github.com/sudo-ui/GridUI-React-Monorepo/blob/main/packages-dashboard/task/stories/approval-panel.stories.tsx",
|
|
46
51
|
"https://github.com/sudo-ui/GridUI-React-Monorepo/blob/main/packages-dashboard/task/stories/task-timeline.stories.tsx"
|
|
47
52
|
]
|
|
@@ -0,0 +1,103 @@
|
|
|
1
|
+
<!-- Generated from public Props and owned stories. Run pnpm docs:storybook. -->
|
|
2
|
+
# ApprovalPanel
|
|
3
|
+
|
|
4
|
+
Presents a proposed action for review with approval and rejection controls. Use it when users must inspect a request before deciding.
|
|
5
|
+
|
|
6
|
+
Import from ``@gridui/task`` and load Theme before this family's stylesheet.
|
|
7
|
+
|
|
8
|
+
```tsx
|
|
9
|
+
import { ApprovalPanel } 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/approval-panel.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<HTMLElement, Element>): void`` · Optional
|
|
31
|
+
|
|
32
|
+
Called when the corresponding interaction occurs; inspect the arguments in Actions.
|
|
33
|
+
|
|
34
|
+
### onBlur
|
|
35
|
+
|
|
36
|
+
``(event: FocusEvent<HTMLElement, Element>): void`` · Optional
|
|
37
|
+
|
|
38
|
+
Called when the corresponding interaction occurs; inspect the arguments in Actions.
|
|
39
|
+
|
|
40
|
+
### onChange
|
|
41
|
+
|
|
42
|
+
``(event: ChangeEvent<HTMLElement, Element>): void`` · Optional
|
|
43
|
+
|
|
44
|
+
Called when the corresponding interaction occurs; inspect the arguments in Actions.
|
|
45
|
+
|
|
46
|
+
### onSubmit
|
|
47
|
+
|
|
48
|
+
``(event: SubmitEvent<HTMLElement>): void`` · Optional
|
|
49
|
+
|
|
50
|
+
Called when the corresponding interaction occurs; inspect the arguments in Actions.
|
|
51
|
+
|
|
52
|
+
### onClick
|
|
53
|
+
|
|
54
|
+
``(event: MouseEvent<HTMLElement, MouseEvent>): void`` · Optional
|
|
55
|
+
|
|
56
|
+
Called when the corresponding interaction occurs; inspect the arguments in Actions.
|
|
57
|
+
|
|
58
|
+
### title
|
|
59
|
+
|
|
60
|
+
``string`` · Required
|
|
61
|
+
|
|
62
|
+
### description
|
|
63
|
+
|
|
64
|
+
``ReactNode`` · Optional
|
|
65
|
+
|
|
66
|
+
### status
|
|
67
|
+
|
|
68
|
+
``"pending" | "submitting" | "approved" | "denied" | "failed" | "blocked"`` · Required
|
|
69
|
+
|
|
70
|
+
### statusLabel
|
|
71
|
+
|
|
72
|
+
``string`` · Required
|
|
73
|
+
|
|
74
|
+
### approveLabel
|
|
75
|
+
|
|
76
|
+
``string`` · Required
|
|
77
|
+
|
|
78
|
+
### denyLabel
|
|
79
|
+
|
|
80
|
+
``string`` · Required
|
|
81
|
+
|
|
82
|
+
### recordLabel
|
|
83
|
+
|
|
84
|
+
``string`` · Required
|
|
85
|
+
|
|
86
|
+
### onDecision
|
|
87
|
+
|
|
88
|
+
``(decision: "approve" | "deny"): void`` · Required
|
|
89
|
+
|
|
90
|
+
Called when the corresponding interaction occurs; inspect the arguments in Actions.
|
|
91
|
+
|
|
92
|
+
### disabled
|
|
93
|
+
|
|
94
|
+
``boolean | undefined`` · Optional
|
|
95
|
+
|
|
96
|
+
Default: ``false``
|
|
97
|
+
|
|
98
|
+
Prevents interaction when enabled.
|
|
99
|
+
|
|
100
|
+
### error
|
|
101
|
+
|
|
102
|
+
``ReactNode`` · Optional
|
|
103
|
+
|
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
<!-- Generated from public Props and owned stories. Run pnpm docs:storybook. -->
|
|
2
|
+
# TaskTimeline
|
|
3
|
+
|
|
4
|
+
Displays task events and their progress in chronological order. Use it to explain what has happened during a workflow.
|
|
5
|
+
|
|
6
|
+
Import from ``@gridui/task`` and load Theme before this family's stylesheet.
|
|
7
|
+
|
|
8
|
+
```tsx
|
|
9
|
+
import { TaskTimeline } 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/task-timeline.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<HTMLOListElement, Element>): void`` · Optional
|
|
25
|
+
|
|
26
|
+
Called when the corresponding interaction occurs; inspect the arguments in Actions.
|
|
27
|
+
|
|
28
|
+
### onBlur
|
|
29
|
+
|
|
30
|
+
``(event: FocusEvent<HTMLOListElement, Element>): void`` · Optional
|
|
31
|
+
|
|
32
|
+
Called when the corresponding interaction occurs; inspect the arguments in Actions.
|
|
33
|
+
|
|
34
|
+
### onChange
|
|
35
|
+
|
|
36
|
+
``(event: ChangeEvent<HTMLOListElement, Element>): void`` · Optional
|
|
37
|
+
|
|
38
|
+
Called when the corresponding interaction occurs; inspect the arguments in Actions.
|
|
39
|
+
|
|
40
|
+
### onSubmit
|
|
41
|
+
|
|
42
|
+
``(event: SubmitEvent<HTMLOListElement>): void`` · Optional
|
|
43
|
+
|
|
44
|
+
Called when the corresponding interaction occurs; inspect the arguments in Actions.
|
|
45
|
+
|
|
46
|
+
### onClick
|
|
47
|
+
|
|
48
|
+
``(event: MouseEvent<HTMLOListElement, MouseEvent>): void`` · Optional
|
|
49
|
+
|
|
50
|
+
Called when the corresponding interaction occurs; inspect the arguments in Actions.
|
|
51
|
+
|
|
52
|
+
### steps
|
|
53
|
+
|
|
54
|
+
``readonly TaskStep[]`` · Required
|
|
55
|
+
|
|
56
|
+
### label
|
|
57
|
+
|
|
58
|
+
``string`` · Required
|
|
59
|
+
|
|
60
|
+
### disabled
|
|
61
|
+
|
|
62
|
+
``boolean | undefined`` · Optional
|
|
63
|
+
|
|
64
|
+
Default: ``false``
|
|
65
|
+
|
|
66
|
+
Prevents interaction when enabled.
|
|
67
|
+
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@gridui/task",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.9",
|
|
4
4
|
"description": "GridUI React task",
|
|
5
5
|
"license": "UNLICENSED",
|
|
6
6
|
"type": "module",
|
|
@@ -27,15 +27,15 @@
|
|
|
27
27
|
"react-dom": "^19.2.0"
|
|
28
28
|
},
|
|
29
29
|
"dependencies": {
|
|
30
|
-
"@gridui/button": "^4.
|
|
31
|
-
"@gridui/disclosure": "^
|
|
32
|
-
"@gridui/style-utils": "^
|
|
30
|
+
"@gridui/button": "^4.1.0",
|
|
31
|
+
"@gridui/disclosure": "^2.0.0",
|
|
32
|
+
"@gridui/style-utils": "^4.0.0",
|
|
33
33
|
"@gridui/theme": "^2.5.3",
|
|
34
34
|
"class-variance-authority": "0.7.1"
|
|
35
35
|
},
|
|
36
36
|
"devDependencies": {
|
|
37
37
|
"@gridui-internal/configuration": "0.0.0-internal",
|
|
38
|
-
"@gridui/code-view": "1.0.
|
|
38
|
+
"@gridui/code-view": "1.0.7",
|
|
39
39
|
"@jest/globals": "30.5.2",
|
|
40
40
|
"@storybook/react-vite": "10.6.6",
|
|
41
41
|
"@types/jest": "30.0.0",
|