@yuva-devlab/ui 2.0.0 → 2.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/common.css +0 -40
- package/dist/components/badge/badge.css +31 -27
- package/dist/components/badge/badge.mdx +6 -4
- package/dist/components/chain-of-thought/chain-of-thought.css +72 -0
- package/dist/components/chain-of-thought/chain-of-thought.mdx +18 -0
- package/dist/components/checkpoint/checkpoint.css +54 -0
- package/dist/components/checkpoint/checkpoint.mdx +18 -0
- package/dist/components/code-block/code-block.css +84 -0
- package/dist/components/code-block/code-block.mdx +26 -0
- package/dist/components/confirmation/confirmation.css +75 -0
- package/dist/components/confirmation/confirmation.mdx +22 -0
- package/dist/components/context/context.css +80 -0
- package/dist/components/context/context.mdx +18 -0
- package/dist/components/data-table/data-table.css +71 -0
- package/dist/components/data-table/data-table.mdx +22 -0
- package/dist/components/file-tree/file-tree.css +58 -0
- package/dist/components/file-tree/file-tree.mdx +18 -0
- package/dist/components/input-number/input-number.css +95 -0
- package/dist/components/input-number/input-number.mdx +34 -0
- package/dist/components/kbd/kbd.css +78 -0
- package/dist/components/kbd/kbd.mdx +30 -0
- package/dist/components/message/message.css +89 -0
- package/dist/components/message/message.mdx +14 -0
- package/dist/components/model-selector/model-selector.css +138 -0
- package/dist/components/model-selector/model-selector.mdx +26 -0
- package/dist/components/multi-select/multi-select.css +212 -0
- package/dist/components/multi-select/multi-select.mdx +30 -0
- package/dist/components/password-input/password-input.css +21 -0
- package/dist/components/password-input/password-input.mdx +30 -0
- package/dist/components/plan/plan.css +106 -0
- package/dist/components/plan/plan.mdx +22 -0
- package/dist/components/popover/popover.css +0 -5
- package/dist/components/prompt-input/prompt-input.css +140 -0
- package/dist/components/prompt-input/prompt-input.mdx +22 -0
- package/dist/components/queue/queue.css +76 -0
- package/dist/components/queue/queue.mdx +18 -0
- package/dist/components/search-input/search-input.css +21 -0
- package/dist/components/search-input/search-input.mdx +30 -0
- package/dist/components/select/select.css +1 -1
- package/dist/components/sonner/sonner.css +68 -17
- package/dist/components/sonner/sonner.mdx +5 -3
- package/dist/components/sources/sources.css +105 -0
- package/dist/components/sources/sources.mdx +18 -0
- package/dist/components/stack-trace/stack-trace.css +105 -0
- package/dist/components/stack-trace/stack-trace.mdx +18 -0
- package/dist/components/subagent/subagent.css +70 -0
- package/dist/components/subagent/subagent.mdx +18 -0
- package/dist/components/suggestion/suggestion.css +52 -0
- package/dist/components/suggestion/suggestion.mdx +14 -0
- package/dist/components/terminal/terminal.css +60 -0
- package/dist/components/terminal/terminal.mdx +26 -0
- package/dist/components/test-results/test-results.css +108 -0
- package/dist/components/test-results/test-results.mdx +18 -0
- package/dist/components/tool-call/tool-call.css +111 -0
- package/dist/components/tool-call/tool-call.mdx +22 -0
- package/dist/components/trace/trace.css +100 -0
- package/dist/components/trace/trace.mdx +18 -0
- package/dist/components.css +2582 -299
- package/dist/index.cjs +3539 -818
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +1041 -8
- package/dist/index.d.ts +1041 -8
- package/dist/index.js +3570 -864
- package/dist/index.js.map +1 -1
- package/dist/preset.css +0 -1
- package/dist/styles/common.css +0 -40
- package/dist/styles/components.css +2582 -299
- package/dist/styles/preset.css +0 -1
- package/package.json +1 -1
package/dist/common.css
CHANGED
|
@@ -106,46 +106,6 @@
|
|
|
106
106
|
}
|
|
107
107
|
}
|
|
108
108
|
|
|
109
|
-
@keyframes dl-spin {
|
|
110
|
-
from {
|
|
111
|
-
transform: rotate(0deg);
|
|
112
|
-
}
|
|
113
|
-
to {
|
|
114
|
-
transform: rotate(360deg);
|
|
115
|
-
}
|
|
116
|
-
}
|
|
117
|
-
|
|
118
|
-
/* ── Sonner Toast Semantic Feedback ──────────────────────────────────────── */
|
|
119
|
-
[data-sonner-toaster] [data-sonner-toast] {
|
|
120
|
-
border-radius: var(--radius-md, 0.375rem);
|
|
121
|
-
}
|
|
122
|
-
[data-sonner-toaster] [data-sonner-toast][data-type="success"] {
|
|
123
|
-
border-color: color-mix(in oklch, var(--success) 35%, transparent);
|
|
124
|
-
}
|
|
125
|
-
[data-sonner-toaster] [data-sonner-toast][data-type="success"] [data-icon] {
|
|
126
|
-
color: var(--success);
|
|
127
|
-
}
|
|
128
|
-
[data-sonner-toaster] [data-sonner-toast][data-type="error"],
|
|
129
|
-
[data-sonner-toaster] [data-sonner-toast][data-type="destructive"] {
|
|
130
|
-
border-color: color-mix(in oklch, var(--destructive) 35%, transparent);
|
|
131
|
-
}
|
|
132
|
-
[data-sonner-toaster] [data-sonner-toast][data-type="error"] [data-icon],
|
|
133
|
-
[data-sonner-toaster] [data-sonner-toast][data-type="destructive"] [data-icon] {
|
|
134
|
-
color: var(--destructive);
|
|
135
|
-
}
|
|
136
|
-
[data-sonner-toaster] [data-sonner-toast][data-type="warning"] {
|
|
137
|
-
border-color: color-mix(in oklch, var(--warning) 35%, transparent);
|
|
138
|
-
}
|
|
139
|
-
[data-sonner-toaster] [data-sonner-toast][data-type="warning"] [data-icon] {
|
|
140
|
-
color: var(--warning);
|
|
141
|
-
}
|
|
142
|
-
[data-sonner-toaster] [data-sonner-toast][data-type="info"] {
|
|
143
|
-
border-color: color-mix(in oklch, var(--info) 35%, transparent);
|
|
144
|
-
}
|
|
145
|
-
[data-sonner-toaster] [data-sonner-toast][data-type="info"] [data-icon] {
|
|
146
|
-
color: var(--info);
|
|
147
|
-
}
|
|
148
|
-
|
|
149
109
|
/* ── Shared Glass & Surface Utilities ────────────────────────────────────── */
|
|
150
110
|
.dl-glass {
|
|
151
111
|
background-color: var(
|
|
@@ -39,38 +39,42 @@
|
|
|
39
39
|
border-color: var(--border);
|
|
40
40
|
}
|
|
41
41
|
|
|
42
|
-
.dl-
|
|
42
|
+
.dl-badge-wrapper {
|
|
43
|
+
position: relative;
|
|
44
|
+
display: inline-flex;
|
|
45
|
+
vertical-align: middle;
|
|
46
|
+
flex-shrink: 0;
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
.dl-badge-count {
|
|
50
|
+
position: absolute;
|
|
51
|
+
top: 0;
|
|
52
|
+
right: 0;
|
|
53
|
+
transform: translate(50%, -50%);
|
|
54
|
+
transform-origin: 100% 0%;
|
|
55
|
+
z-index: 10;
|
|
43
56
|
display: inline-flex;
|
|
44
57
|
align-items: center;
|
|
45
|
-
|
|
58
|
+
justify-content: center;
|
|
59
|
+
min-width: 1.25rem;
|
|
60
|
+
height: 1.25rem;
|
|
61
|
+
padding: 0 0.375rem;
|
|
46
62
|
border-radius: 9999px;
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
font-
|
|
63
|
+
background-color: var(--destructive);
|
|
64
|
+
color: var(--destructive-foreground);
|
|
65
|
+
font-size: 0.6875rem;
|
|
66
|
+
font-weight: 600;
|
|
67
|
+
line-height: 1;
|
|
68
|
+
white-space: nowrap;
|
|
69
|
+
box-shadow: 0 0 0 2px var(--background);
|
|
50
70
|
}
|
|
51
|
-
|
|
71
|
+
|
|
72
|
+
.dl-badge-dot {
|
|
73
|
+
min-width: 0.5rem;
|
|
52
74
|
width: 0.5rem;
|
|
53
75
|
height: 0.5rem;
|
|
76
|
+
padding: 0;
|
|
54
77
|
border-radius: 9999px;
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
.dl-status-badge--success {
|
|
58
|
-
background-color: color-mix(in oklch, var(--success) 15%, transparent);
|
|
59
|
-
color: var(--success);
|
|
60
|
-
}
|
|
61
|
-
.dl-status-badge--destructive {
|
|
62
|
-
background-color: color-mix(in oklch, var(--destructive) 15%, transparent);
|
|
63
|
-
color: var(--destructive);
|
|
64
|
-
}
|
|
65
|
-
.dl-status-badge--warning {
|
|
66
|
-
background-color: color-mix(in oklch, var(--warning) 15%, transparent);
|
|
67
|
-
color: var(--warning);
|
|
68
|
-
}
|
|
69
|
-
.dl-status-badge--info {
|
|
70
|
-
background-color: color-mix(in oklch, var(--info) 15%, transparent);
|
|
71
|
-
color: var(--info);
|
|
72
|
-
}
|
|
73
|
-
.dl-status-badge--muted {
|
|
74
|
-
background-color: var(--muted);
|
|
75
|
-
color: var(--muted-foreground);
|
|
78
|
+
background-color: var(--destructive);
|
|
79
|
+
box-shadow: 0 0 0 2px var(--background);
|
|
76
80
|
}
|
|
@@ -7,18 +7,20 @@ import * as BadgeStories from "./badge.stories";
|
|
|
7
7
|
|
|
8
8
|
# Badge
|
|
9
9
|
|
|
10
|
-
|
|
10
|
+
Versatile badge primitive supporting both standalone status tags and floating notification counters (`count`, `overflowCount`, `dot`) over icons, avatars, and buttons.
|
|
11
11
|
|
|
12
12
|
## Default
|
|
13
13
|
|
|
14
14
|
<Canvas of={BadgeStories.Default} />
|
|
15
15
|
|
|
16
|
-
## Variants
|
|
17
|
-
|
|
18
|
-
Available in `default`, `secondary`, `outline`, `destructive`, `success`, `warning`, and `info`.
|
|
16
|
+
## All Semantic Variants
|
|
19
17
|
|
|
20
18
|
<Canvas of={BadgeStories.AllVariants} />
|
|
21
19
|
|
|
20
|
+
## Notification Counter & Status Dot
|
|
21
|
+
|
|
22
|
+
<Canvas of={BadgeStories.NotificationCounts} />
|
|
23
|
+
|
|
22
24
|
## Component Properties
|
|
23
25
|
|
|
24
26
|
<Controls />
|
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
.dl-cot {
|
|
2
|
+
display: flex;
|
|
3
|
+
flex-direction: column;
|
|
4
|
+
width: 100%;
|
|
5
|
+
border-radius: var(--radius-md, 0.375rem);
|
|
6
|
+
border: 1px solid var(--border);
|
|
7
|
+
background-color: var(--secondary, var(--card));
|
|
8
|
+
font-size: 0.8125rem;
|
|
9
|
+
overflow: hidden;
|
|
10
|
+
transition: border-color 0.15s ease;
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
.dl-cot:hover {
|
|
14
|
+
border-color: color-mix(in oklch, var(--primary) 30%, var(--border));
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
.dl-cot__header {
|
|
18
|
+
display: flex;
|
|
19
|
+
align-items: center;
|
|
20
|
+
justify-content: space-between;
|
|
21
|
+
width: 100%;
|
|
22
|
+
padding: 0.5rem 0.75rem;
|
|
23
|
+
background: transparent;
|
|
24
|
+
border: none;
|
|
25
|
+
cursor: pointer;
|
|
26
|
+
text-align: left;
|
|
27
|
+
font: inherit;
|
|
28
|
+
color: var(--foreground);
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
.dl-cot__summary {
|
|
32
|
+
display: flex;
|
|
33
|
+
align-items: center;
|
|
34
|
+
gap: 0.5rem;
|
|
35
|
+
font-weight: 500;
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
.dl-cot__chevron {
|
|
39
|
+
width: 0.875rem;
|
|
40
|
+
height: 0.875rem;
|
|
41
|
+
color: var(--muted-foreground);
|
|
42
|
+
transition: transform 0.2s ease;
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
.dl-cot[data-state="open"] .dl-cot__chevron {
|
|
46
|
+
transform: rotate(180deg);
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
.dl-cot__content {
|
|
50
|
+
display: flex;
|
|
51
|
+
flex-direction: column;
|
|
52
|
+
gap: 0.375rem;
|
|
53
|
+
padding: 0.5rem 0.75rem 0.75rem;
|
|
54
|
+
border-top: 1px solid var(--border);
|
|
55
|
+
background-color: var(--background);
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
.dl-cot__step {
|
|
59
|
+
display: flex;
|
|
60
|
+
align-items: center;
|
|
61
|
+
gap: 0.5rem;
|
|
62
|
+
font-size: 0.75rem;
|
|
63
|
+
color: var(--muted-foreground);
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
.dl-cot__step--running {
|
|
67
|
+
color: var(--foreground);
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
.dl-cot__step--error {
|
|
71
|
+
color: var(--destructive);
|
|
72
|
+
}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { Meta, Title, Description, Canvas } from "@storybook/blocks";
|
|
2
|
+
import * as ChainOfThoughtStories from "./chain-of-thought.stories";
|
|
3
|
+
|
|
4
|
+
<Meta of={ChainOfThoughtStories} />
|
|
5
|
+
|
|
6
|
+
<Title />
|
|
7
|
+
|
|
8
|
+
# Chain of Thought
|
|
9
|
+
|
|
10
|
+
Visual presentation for AI model reasoning processes, featuring execution duration timers, live animated thinking states, and expandable step lists.
|
|
11
|
+
|
|
12
|
+
## Default Completed Thought
|
|
13
|
+
|
|
14
|
+
<Canvas of={ChainOfThoughtStories.Default} />
|
|
15
|
+
|
|
16
|
+
## Live Streaming / Currently Thinking
|
|
17
|
+
|
|
18
|
+
<Canvas of={ChainOfThoughtStories.CurrentlyThinking} />
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
.dl-checkpoint {
|
|
2
|
+
position: relative;
|
|
3
|
+
display: flex;
|
|
4
|
+
align-items: center;
|
|
5
|
+
justify-content: center;
|
|
6
|
+
width: 100%;
|
|
7
|
+
margin: 1.25rem 0;
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
.dl-checkpoint::before {
|
|
11
|
+
content: "";
|
|
12
|
+
position: absolute;
|
|
13
|
+
left: 0;
|
|
14
|
+
right: 0;
|
|
15
|
+
top: 50%;
|
|
16
|
+
height: 1px;
|
|
17
|
+
background-color: var(--border);
|
|
18
|
+
z-index: 1;
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
.dl-checkpoint__content {
|
|
22
|
+
position: relative;
|
|
23
|
+
z-index: 2;
|
|
24
|
+
display: inline-flex;
|
|
25
|
+
align-items: center;
|
|
26
|
+
gap: 0.5rem;
|
|
27
|
+
padding: 0.25rem 0.75rem;
|
|
28
|
+
border-radius: 9999px;
|
|
29
|
+
background-color: var(--background);
|
|
30
|
+
border: 1px solid var(--border);
|
|
31
|
+
font-size: 0.75rem;
|
|
32
|
+
color: var(--muted-foreground);
|
|
33
|
+
box-shadow: 0 1px 2px rgb(0 0 0 / 0.05);
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
.dl-checkpoint__restore-btn {
|
|
37
|
+
display: inline-flex;
|
|
38
|
+
align-items: center;
|
|
39
|
+
gap: 0.25rem;
|
|
40
|
+
background: transparent;
|
|
41
|
+
border: none;
|
|
42
|
+
font: inherit;
|
|
43
|
+
font-weight: 500;
|
|
44
|
+
font-size: 0.6875rem;
|
|
45
|
+
color: var(--primary);
|
|
46
|
+
cursor: pointer;
|
|
47
|
+
padding: 0.125rem 0.375rem;
|
|
48
|
+
border-radius: var(--radius-sm, 0.25rem);
|
|
49
|
+
transition: all 0.15s ease;
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
.dl-checkpoint__restore-btn:hover {
|
|
53
|
+
background-color: color-mix(in oklch, var(--primary) 10%, transparent);
|
|
54
|
+
}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { Meta, Title, Description, Canvas } from "@storybook/blocks";
|
|
2
|
+
import * as CheckpointStories from "./checkpoint.stories";
|
|
3
|
+
|
|
4
|
+
<Meta of={CheckpointStories} />
|
|
5
|
+
|
|
6
|
+
<Title />
|
|
7
|
+
|
|
8
|
+
# Checkpoint
|
|
9
|
+
|
|
10
|
+
Divider marker indicating a significant milestone in conversational history with optional one-click restore capabilities.
|
|
11
|
+
|
|
12
|
+
## Default with Restore Action
|
|
13
|
+
|
|
14
|
+
<Canvas of={CheckpointStories.Default} />
|
|
15
|
+
|
|
16
|
+
## Informational Checkpoint
|
|
17
|
+
|
|
18
|
+
<Canvas of={CheckpointStories.WithoutRestore} />
|
|
@@ -0,0 +1,84 @@
|
|
|
1
|
+
.dl-code-block {
|
|
2
|
+
position: relative;
|
|
3
|
+
display: flex;
|
|
4
|
+
flex-direction: column;
|
|
5
|
+
width: 100%;
|
|
6
|
+
border-radius: var(--radius-md, 0.375rem);
|
|
7
|
+
border: 1px solid var(--border);
|
|
8
|
+
background-color: var(--secondary, #0d1117);
|
|
9
|
+
color: var(--foreground);
|
|
10
|
+
font-family: var(--font-mono, ui-monospace, SFMono-Regular, monospace);
|
|
11
|
+
font-size: 0.8125rem;
|
|
12
|
+
overflow: hidden;
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
.dl-code-block__header {
|
|
16
|
+
display: flex;
|
|
17
|
+
align-items: center;
|
|
18
|
+
justify-content: space-between;
|
|
19
|
+
padding: 0.375rem 0.75rem;
|
|
20
|
+
border-bottom: 1px solid var(--border);
|
|
21
|
+
background-color: var(--background);
|
|
22
|
+
font-size: 0.75rem;
|
|
23
|
+
color: var(--muted-foreground);
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
.dl-code-block__filename {
|
|
27
|
+
font-weight: 500;
|
|
28
|
+
color: var(--foreground);
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
.dl-code-block__language {
|
|
32
|
+
text-transform: uppercase;
|
|
33
|
+
font-size: 0.6875rem;
|
|
34
|
+
letter-spacing: 0.05em;
|
|
35
|
+
opacity: 0.8;
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
.dl-code-block__copy-btn {
|
|
39
|
+
display: inline-flex;
|
|
40
|
+
align-items: center;
|
|
41
|
+
justify-content: center;
|
|
42
|
+
width: 1.625rem;
|
|
43
|
+
height: 1.625rem;
|
|
44
|
+
border-radius: var(--radius-sm, 0.25rem);
|
|
45
|
+
border: 1px solid transparent;
|
|
46
|
+
background: transparent;
|
|
47
|
+
color: var(--muted-foreground);
|
|
48
|
+
cursor: pointer;
|
|
49
|
+
transition: all 0.15s ease;
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
.dl-code-block__copy-btn:hover {
|
|
53
|
+
background-color: var(--accent);
|
|
54
|
+
color: var(--foreground);
|
|
55
|
+
border-color: var(--border);
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
.dl-code-block__content {
|
|
59
|
+
margin: 0;
|
|
60
|
+
padding: 0.75rem 1rem;
|
|
61
|
+
overflow-x: auto;
|
|
62
|
+
line-height: 1.5;
|
|
63
|
+
tab-size: 2;
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
.dl-code-block__content--wrap {
|
|
67
|
+
white-space: pre-wrap;
|
|
68
|
+
word-break: break-all;
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
.dl-code-block__line {
|
|
72
|
+
display: flex;
|
|
73
|
+
min-height: 1.25rem;
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
.dl-code-block__line-num {
|
|
77
|
+
display: inline-block;
|
|
78
|
+
width: 2rem;
|
|
79
|
+
padding-right: 0.75rem;
|
|
80
|
+
text-align: right;
|
|
81
|
+
color: var(--muted-foreground);
|
|
82
|
+
opacity: 0.5;
|
|
83
|
+
user-select: none;
|
|
84
|
+
}
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import { Meta, Title, Description, Canvas, Controls } from "@storybook/blocks";
|
|
2
|
+
import * as CodeBlockStories from "./code-block.stories";
|
|
3
|
+
|
|
4
|
+
<Meta of={CodeBlockStories} />
|
|
5
|
+
|
|
6
|
+
<Title />
|
|
7
|
+
|
|
8
|
+
# Code Block
|
|
9
|
+
|
|
10
|
+
Syntax code snippet presentation container with filename badge, language label, line numbers, and one-click copy button.
|
|
11
|
+
|
|
12
|
+
## Default with Copy & Line Numbers
|
|
13
|
+
|
|
14
|
+
<Canvas of={CodeBlockStories.Default} />
|
|
15
|
+
|
|
16
|
+
## Minimal Code Block (Without Header)
|
|
17
|
+
|
|
18
|
+
<Canvas of={CodeBlockStories.WithoutHeader} />
|
|
19
|
+
|
|
20
|
+
## Multi-Line SQL Schema
|
|
21
|
+
|
|
22
|
+
<Canvas of={CodeBlockStories.LineNumbers} />
|
|
23
|
+
|
|
24
|
+
## Component Properties
|
|
25
|
+
|
|
26
|
+
<Controls />
|
|
@@ -0,0 +1,75 @@
|
|
|
1
|
+
.dl-confirmation {
|
|
2
|
+
display: flex;
|
|
3
|
+
align-items: center;
|
|
4
|
+
justify-content: space-between;
|
|
5
|
+
gap: 1rem;
|
|
6
|
+
width: 100%;
|
|
7
|
+
border-radius: var(--radius-md, 0.375rem);
|
|
8
|
+
padding: 0.75rem 1rem;
|
|
9
|
+
border: 1px solid var(--border);
|
|
10
|
+
background-color: var(--card, var(--background));
|
|
11
|
+
color: var(--card-foreground, var(--foreground));
|
|
12
|
+
font-size: 0.875rem;
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
.dl-confirmation--sm {
|
|
16
|
+
padding: 0.5rem 0.75rem;
|
|
17
|
+
font-size: 0.8125rem;
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
.dl-confirmation--destructive {
|
|
21
|
+
border-color: color-mix(in oklch, var(--destructive) 40%, transparent);
|
|
22
|
+
background-color: color-mix(in oklch, var(--destructive) 5%, transparent);
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
.dl-confirmation__body {
|
|
26
|
+
display: flex;
|
|
27
|
+
align-items: center;
|
|
28
|
+
gap: 0.75rem;
|
|
29
|
+
flex: 1;
|
|
30
|
+
min-width: 0;
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
.dl-confirmation__media {
|
|
34
|
+
display: inline-flex;
|
|
35
|
+
align-items: center;
|
|
36
|
+
justify-content: center;
|
|
37
|
+
width: 2rem;
|
|
38
|
+
height: 2rem;
|
|
39
|
+
border-radius: var(--radius-sm, 0.25rem);
|
|
40
|
+
background-color: var(--secondary);
|
|
41
|
+
color: var(--secondary-foreground);
|
|
42
|
+
flex-shrink: 0;
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
.dl-confirmation--destructive .dl-confirmation__media {
|
|
46
|
+
background-color: color-mix(in oklch, var(--destructive) 15%, transparent);
|
|
47
|
+
color: var(--destructive);
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
.dl-confirmation__content {
|
|
51
|
+
display: flex;
|
|
52
|
+
flex-direction: column;
|
|
53
|
+
gap: 0.125rem;
|
|
54
|
+
min-width: 0;
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
.dl-confirmation__title {
|
|
58
|
+
font-size: 0.875rem;
|
|
59
|
+
font-weight: 500;
|
|
60
|
+
line-height: 1.25;
|
|
61
|
+
color: var(--foreground);
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
.dl-confirmation__description {
|
|
65
|
+
font-size: 0.75rem;
|
|
66
|
+
color: var(--muted-foreground);
|
|
67
|
+
line-height: 1.35;
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
.dl-confirmation__actions {
|
|
71
|
+
display: flex;
|
|
72
|
+
align-items: center;
|
|
73
|
+
gap: 0.5rem;
|
|
74
|
+
flex-shrink: 0;
|
|
75
|
+
}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { Meta, Title, Description, Canvas } from "@storybook/blocks";
|
|
2
|
+
import * as ConfirmationStories from "./confirmation.stories";
|
|
3
|
+
|
|
4
|
+
<Meta of={ConfirmationStories} />
|
|
5
|
+
|
|
6
|
+
<Title />
|
|
7
|
+
|
|
8
|
+
# Confirmation
|
|
9
|
+
|
|
10
|
+
Human-in-the-loop action approval card for sensitive or destructive AI agent actions, with title, risk description, and contextual approve/deny actions.
|
|
11
|
+
|
|
12
|
+
## Default Command Approval
|
|
13
|
+
|
|
14
|
+
<Canvas of={ConfirmationStories.Default} />
|
|
15
|
+
|
|
16
|
+
## Destructive Resource Deletion
|
|
17
|
+
|
|
18
|
+
<Canvas of={ConfirmationStories.Destructive} />
|
|
19
|
+
|
|
20
|
+
## IAM Policy Approval
|
|
21
|
+
|
|
22
|
+
<Canvas of={ConfirmationStories.PolicyApproval} />
|
|
@@ -0,0 +1,80 @@
|
|
|
1
|
+
.dl-context-usage {
|
|
2
|
+
display: flex;
|
|
3
|
+
flex-direction: column;
|
|
4
|
+
gap: 0.5rem;
|
|
5
|
+
width: 100%;
|
|
6
|
+
padding: 0.75rem;
|
|
7
|
+
border-radius: var(--radius-md, 0.375rem);
|
|
8
|
+
border: 1px solid var(--border);
|
|
9
|
+
background-color: var(--card, var(--background));
|
|
10
|
+
font-size: 0.8125rem;
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
.dl-context-usage--sm {
|
|
14
|
+
padding: 0.5rem;
|
|
15
|
+
font-size: 0.75rem;
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
.dl-context-usage__header {
|
|
19
|
+
display: flex;
|
|
20
|
+
align-items: center;
|
|
21
|
+
justify-content: space-between;
|
|
22
|
+
gap: 0.5rem;
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
.dl-context-usage__title {
|
|
26
|
+
display: flex;
|
|
27
|
+
align-items: center;
|
|
28
|
+
gap: 0.375rem;
|
|
29
|
+
font-weight: 600;
|
|
30
|
+
color: var(--foreground);
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
.dl-context-usage__fraction {
|
|
34
|
+
font-family: var(--font-mono, ui-monospace, SFMono-Regular, monospace);
|
|
35
|
+
font-size: 0.75rem;
|
|
36
|
+
color: var(--muted-foreground);
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
.dl-context-usage__bar-bg {
|
|
40
|
+
position: relative;
|
|
41
|
+
width: 100%;
|
|
42
|
+
height: 0.375rem;
|
|
43
|
+
border-radius: 9999px;
|
|
44
|
+
background-color: var(--muted);
|
|
45
|
+
overflow: hidden;
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
.dl-context-usage__bar-fill {
|
|
49
|
+
height: 100%;
|
|
50
|
+
border-radius: 9999px;
|
|
51
|
+
transition: width 0.3s ease;
|
|
52
|
+
background-color: var(--primary);
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
.dl-context-usage__bar-fill--warning {
|
|
56
|
+
background-color: var(--warning);
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
.dl-context-usage__bar-fill--danger {
|
|
60
|
+
background-color: var(--destructive);
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
.dl-context-usage__breakdown {
|
|
64
|
+
display: flex;
|
|
65
|
+
align-items: center;
|
|
66
|
+
gap: 0.5rem;
|
|
67
|
+
flex-wrap: wrap;
|
|
68
|
+
font-size: 0.6875rem;
|
|
69
|
+
color: var(--muted-foreground);
|
|
70
|
+
margin-top: 0.25rem;
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
.dl-context-usage__pill {
|
|
74
|
+
display: inline-flex;
|
|
75
|
+
align-items: center;
|
|
76
|
+
gap: 0.25rem;
|
|
77
|
+
padding: 0.125rem 0.375rem;
|
|
78
|
+
border-radius: var(--radius-sm, 0.25rem);
|
|
79
|
+
background-color: var(--muted);
|
|
80
|
+
}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { Meta, Title, Description, Canvas, Controls } from "@storybook/blocks";
|
|
2
|
+
import * as ContextStories from "./context.stories";
|
|
3
|
+
|
|
4
|
+
<Meta of={ContextStories} />
|
|
5
|
+
|
|
6
|
+
<Title />
|
|
7
|
+
|
|
8
|
+
# Context Usage
|
|
9
|
+
|
|
10
|
+
Token gauge visualizing context window consumption, remaining capacity thresholds, and token category breakdowns (input, output, reasoning, cache).
|
|
11
|
+
|
|
12
|
+
## Default
|
|
13
|
+
|
|
14
|
+
<Canvas of={ContextStories.Default} />
|
|
15
|
+
|
|
16
|
+
## Component Properties
|
|
17
|
+
|
|
18
|
+
<Controls />
|
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
.dl-data-table-container {
|
|
2
|
+
display: flex;
|
|
3
|
+
flex-direction: column;
|
|
4
|
+
width: 100%;
|
|
5
|
+
border-radius: var(--radius-md, 0.375rem);
|
|
6
|
+
border: 1px solid var(--border);
|
|
7
|
+
background-color: var(--card, var(--background));
|
|
8
|
+
overflow: hidden;
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
.dl-data-table-wrapper {
|
|
12
|
+
overflow-x: auto;
|
|
13
|
+
width: 100%;
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
.dl-data-table-sort-btn {
|
|
17
|
+
display: inline-flex;
|
|
18
|
+
align-items: center;
|
|
19
|
+
gap: 0.375rem;
|
|
20
|
+
background: transparent;
|
|
21
|
+
border: none;
|
|
22
|
+
font: inherit;
|
|
23
|
+
color: inherit;
|
|
24
|
+
cursor: pointer;
|
|
25
|
+
padding: 0;
|
|
26
|
+
user-select: none;
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
.dl-data-table-sort-btn:hover {
|
|
30
|
+
color: var(--foreground);
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
.dl-data-table-sort-icon {
|
|
34
|
+
width: 0.875rem;
|
|
35
|
+
height: 0.875rem;
|
|
36
|
+
color: var(--muted-foreground);
|
|
37
|
+
transition: color 0.15s ease;
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
.dl-data-table-sort-btn:hover .dl-data-table-sort-icon {
|
|
41
|
+
color: var(--foreground);
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
.dl-data-table-row--clickable {
|
|
45
|
+
cursor: pointer;
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
.dl-data-table-footer {
|
|
49
|
+
display: flex;
|
|
50
|
+
flex-wrap: wrap;
|
|
51
|
+
align-items: center;
|
|
52
|
+
justify-content: space-between;
|
|
53
|
+
gap: 1rem;
|
|
54
|
+
padding: 0.75rem 1rem;
|
|
55
|
+
border-top: 1px solid var(--border);
|
|
56
|
+
background-color: var(--background);
|
|
57
|
+
font-size: 0.8125rem;
|
|
58
|
+
color: var(--muted-foreground);
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
.dl-data-table-summary {
|
|
62
|
+
display: flex;
|
|
63
|
+
align-items: center;
|
|
64
|
+
gap: 0.25rem;
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
.dl-data-table-empty {
|
|
68
|
+
padding: 3rem 1rem;
|
|
69
|
+
text-align: center;
|
|
70
|
+
color: var(--muted-foreground);
|
|
71
|
+
}
|