@vllnt/ui 0.4.0-canary.sha36bfa21 → 0.4.0-canary.sha49f831b
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/CHANGELOG.md +170 -6
- package/README.md +61 -3
- package/dist/components/atoms/accordion/accordion.js +28 -7
- package/dist/components/atoms/agent-activity/agent-activity.js +1 -1
- package/dist/components/atoms/ai-source-citation/ai-source-citation.js +1 -1
- package/dist/components/atoms/alert/alert.js +1 -1
- package/dist/components/atoms/alert-pulse/alert-pulse.js +7 -4
- package/dist/components/atoms/avatar/avatar.js +129 -24
- package/dist/components/atoms/badge/badge.js +84 -5
- package/dist/components/atoms/bottom-activity-strip/bottom-activity-strip.js +3 -2
- package/dist/components/atoms/breadcrumb/breadcrumb.js +89 -37
- package/dist/components/atoms/checklist/checklist.js +2 -2
- package/dist/components/atoms/curriculum/curriculum.js +4 -4
- package/dist/components/atoms/dialog/dialog.js +4 -2
- package/dist/components/atoms/drawer/drawer.js +1 -1
- package/dist/components/atoms/dropdown-menu/dropdown-menu.js +1 -1
- package/dist/components/atoms/floating-toolbar/floating-toolbar.js +23 -2
- package/dist/components/atoms/gauge-chart/gauge-chart.js +1 -1
- package/dist/components/atoms/glass-progress/glass-progress.js +1 -1
- package/dist/components/atoms/heat-overlay/heat-overlay.js +3 -2
- package/dist/components/atoms/jarvis-dock/jarvis-dock.js +2 -2
- package/dist/components/atoms/kbd/kbd.js +41 -11
- package/dist/components/atoms/keyboard-shortcuts-help/keyboard-shortcuts-help.js +1 -1
- package/dist/components/atoms/menubar/menubar.js +1 -1
- package/dist/components/atoms/meter/meter.js +2 -2
- package/dist/components/atoms/metric-cluster/metric-cluster.js +2 -1
- package/dist/components/atoms/policy-delivery-panel/policy-delivery-panel.js +19 -10
- package/dist/components/atoms/presence-stack/presence-stack.js +1 -1
- package/dist/components/atoms/progress-bar/progress-bar.js +190 -30
- package/dist/components/atoms/pull-quote/pull-quote.js +77 -0
- package/dist/components/atoms/quiz/quiz.js +2 -2
- package/dist/components/atoms/relationship-inspector/relationship-inspector.js +1 -1
- package/dist/components/atoms/routing-assignment-panel/routing-assignment-panel.js +20 -11
- package/dist/components/atoms/runtime-overview-panel/runtime-overview-panel.js +2 -1
- package/dist/components/atoms/scrim/scrim.js +32 -0
- package/dist/components/atoms/segmented-control/segmented-control.js +2 -2
- package/dist/components/atoms/select/select.js +3 -3
- package/dist/components/atoms/sheet/sheet.js +3 -2
- package/dist/components/atoms/skeleton/skeleton.js +1 -1
- package/dist/components/atoms/state-badge-overlay/state-badge-overlay.js +14 -16
- package/dist/components/atoms/stepper/stepper.js +1 -1
- package/dist/components/atoms/sticky-metric/sticky-metric.js +2 -1
- package/dist/components/atoms/table/table.js +1 -1
- package/dist/components/atoms/table-of-contents/table-of-contents.js +1 -1
- package/dist/components/atoms/table-of-contents-panel/table-of-contents-panel.js +4 -4
- package/dist/components/atoms/tabs/tabs.js +34 -11
- package/dist/components/atoms/tag-group/tag-group.js +10 -5
- package/dist/components/atoms/tags-input/tags-input.js +1 -1
- package/dist/components/atoms/thread-bubble/thread-bubble.js +1 -1
- package/dist/components/atoms/threshold-ring/threshold-ring.js +3 -2
- package/dist/components/atoms/timeline/timeline.js +15 -3
- package/dist/components/atoms/timeline-scrubber/timeline-scrubber.js +3 -2
- package/dist/components/atoms/tldr-section/tldr-section.js +5 -5
- package/dist/components/atoms/toggle/toggle.js +1 -1
- package/dist/components/atoms/view-switcher/view-switcher.js +1 -1
- package/dist/components/atoms/viewport-bookmarks/viewport-bookmarks.js +1 -1
- package/dist/components/atoms/watchlist/watchlist.js +1 -1
- package/dist/components/atoms/workspace-switcher/workspace-switcher.js +1 -1
- package/dist/components/index.js +38 -2
- package/dist/components/molecules/ai-artifact/ai-artifact.js +2 -12
- package/dist/components/molecules/approval-request/approval-request.js +168 -0
- package/dist/components/molecules/civilization-card/civilization-card.js +1 -1
- package/dist/components/molecules/completion-dialog/completion-dialog.js +1 -1
- package/dist/components/molecules/content-intro/content-intro.js +2 -2
- package/dist/components/molecules/conversation-thread/conversation-thread.js +5 -5
- package/dist/components/molecules/cookie-consent/cookie-consent.js +188 -80
- package/dist/components/molecules/copy-button/use-copy-to-clipboard.js +10 -12
- package/dist/components/molecules/countdown-timer/countdown-timer.js +1 -1
- package/dist/components/molecules/credit-badge/credit-badge.js +13 -16
- package/dist/components/molecules/filter-bar/filter-bar.js +2 -2
- package/dist/components/molecules/historical-figure-card/historical-figure-card.js +1 -1
- package/dist/components/molecules/plan-badge/plan-badge.js +12 -13
- package/dist/components/molecules/pricing-table/pricing-table.js +1 -1
- package/dist/components/molecules/progress-tracker/progress-tracker.js +8 -17
- package/dist/components/molecules/sidebar/sidebar.js +24 -9
- package/dist/components/molecules/tour/tour.js +1 -1
- package/dist/components/molecules/transaction-list/transaction-list.js +7 -9
- package/dist/components/molecules/tutorial-filters/tutorial-filters.js +2 -2
- package/dist/components/molecules/usage-breakdown/usage-breakdown.js +1 -1
- package/dist/components/organisms/access-matrix/access-matrix.js +271 -0
- package/dist/components/organisms/activity-heatmap/activity-heatmap.js +1 -1
- package/dist/components/organisms/code-block/code-block.js +145 -81
- package/dist/components/organisms/cta-band/cta-band.js +79 -0
- package/dist/components/organisms/flow-diagram/flow-controls.js +1 -1
- package/dist/components/organisms/flow-diagram/flow-fullscreen.js +1 -1
- package/dist/components/organisms/gantt-chart/gantt-chart.js +1 -1
- package/dist/components/organisms/historic-timeline/historic-timeline.js +1 -1
- package/dist/components/organisms/navbar-saas/navbar-saas.js +1 -1
- package/dist/components/organisms/order-summary/order-summary.js +172 -0
- package/dist/components/organisms/settings-list/settings-list.js +125 -0
- package/dist/components/organisms/share-dialog-people/share-dialog-people.js +412 -0
- package/dist/components/organisms/slideshow/slideshow.js +6 -6
- package/dist/components/organisms/subscription-card/subscription-card.js +10 -10
- package/dist/components/organisms/tutorial-complete/tutorial-complete.js +2 -2
- package/dist/components/organisms/tutorial-mdx/tutorial-mdx.js +1 -1
- package/dist/index.d.ts +1143 -82
- package/dist/index.js +10 -0
- package/dist/lib/copy-text.js +64 -0
- package/dist/lib/status-dot.js +33 -0
- package/dist/tailwind-preset.js +16 -0
- package/package.json +17 -4
- package/styles.css +48 -7
- package/themes/default.css +48 -7
- package/themes/presets.css +24 -24
- package/themes/products.css +146 -0
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
3
|
+
import { statusDotVariants } from "../../../lib/status-dot.js";
|
|
3
4
|
import { cn } from "../../../lib/utils.js";
|
|
4
5
|
const STATUS_LABEL = {
|
|
5
6
|
advisory: "Advisory",
|
|
@@ -7,9 +8,9 @@ const STATUS_LABEL = {
|
|
|
7
8
|
enforced: "Enforced"
|
|
8
9
|
};
|
|
9
10
|
const STATUS_TONE = {
|
|
10
|
-
advisory: "
|
|
11
|
-
disabled: "
|
|
12
|
-
enforced: "
|
|
11
|
+
advisory: "warning",
|
|
12
|
+
disabled: "neutral",
|
|
13
|
+
enforced: "success"
|
|
13
14
|
};
|
|
14
15
|
const DEFAULT_LABELS = {
|
|
15
16
|
empty: "No policies",
|
|
@@ -20,14 +21,22 @@ const RowBody = (props) => {
|
|
|
20
21
|
return /* @__PURE__ */ jsxs("span", { className: "flex flex-1 flex-col gap-0.5 text-left", children: [
|
|
21
22
|
/* @__PURE__ */ jsxs("span", { className: "flex items-center justify-between gap-2", children: [
|
|
22
23
|
/* @__PURE__ */ jsx("span", { className: "truncate text-xs font-medium text-foreground", children: policy.name }),
|
|
23
|
-
/* @__PURE__ */
|
|
24
|
+
/* @__PURE__ */ jsxs(
|
|
24
25
|
"span",
|
|
25
26
|
{
|
|
26
|
-
className:
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
27
|
+
className: "inline-flex items-center gap-1.5 rounded-full border border-border bg-secondary px-1.5 py-0.5 text-[10px] uppercase tracking-wide text-foreground",
|
|
28
|
+
"data-policy-status-chip": true,
|
|
29
|
+
children: [
|
|
30
|
+
/* @__PURE__ */ jsx(
|
|
31
|
+
"span",
|
|
32
|
+
{
|
|
33
|
+
"aria-hidden": "true",
|
|
34
|
+
className: statusDotVariants({ tone: STATUS_TONE[policy.status] }),
|
|
35
|
+
"data-policy-status-dot": true
|
|
36
|
+
}
|
|
37
|
+
),
|
|
38
|
+
STATUS_LABEL[policy.status]
|
|
39
|
+
]
|
|
31
40
|
}
|
|
32
41
|
)
|
|
33
42
|
] }),
|
|
@@ -43,7 +52,7 @@ const Row = (props) => {
|
|
|
43
52
|
return /* @__PURE__ */ jsx(
|
|
44
53
|
"button",
|
|
45
54
|
{
|
|
46
|
-
className: "flex w-full items-center gap-2 rounded-md border border-transparent px-2 py-1.5 text-left transition-colors hover:border-border hover:bg-
|
|
55
|
+
className: "flex w-full items-center gap-2 rounded-md border border-transparent px-2 py-1.5 text-left transition-colors hover:border-border hover:bg-secondary/40 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring",
|
|
47
56
|
"data-policy-row": policy.id,
|
|
48
57
|
"data-policy-status": policy.status,
|
|
49
58
|
onClick: handleTogglePolicy,
|
|
@@ -95,7 +95,7 @@ const renderOverflow = (input) => {
|
|
|
95
95
|
"aria-label": aria,
|
|
96
96
|
className: cn(
|
|
97
97
|
className,
|
|
98
|
-
"transition-colors hover:bg-
|
|
98
|
+
"transition-colors hover:bg-secondary/80 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring"
|
|
99
99
|
),
|
|
100
100
|
"data-presence-stack-overflow": true,
|
|
101
101
|
onClick: input.handleClick,
|
|
@@ -1,56 +1,216 @@
|
|
|
1
|
+
"use client";
|
|
1
2
|
import { Fragment, jsx, jsxs } from "react/jsx-runtime";
|
|
3
|
+
import * as React from "react";
|
|
4
|
+
import { cva } from "class-variance-authority";
|
|
2
5
|
import { cn } from "../../../lib/utils.js";
|
|
3
|
-
|
|
6
|
+
const progressBarTrackVariants = cva(
|
|
7
|
+
"overflow-hidden rounded-full bg-secondary",
|
|
8
|
+
{
|
|
9
|
+
defaultVariants: {
|
|
10
|
+
size: "md"
|
|
11
|
+
},
|
|
12
|
+
variants: {
|
|
13
|
+
size: {
|
|
14
|
+
lg: "h-3",
|
|
15
|
+
md: "h-2",
|
|
16
|
+
sm: "h-1"
|
|
17
|
+
}
|
|
18
|
+
}
|
|
19
|
+
}
|
|
20
|
+
);
|
|
21
|
+
const progressBarFillVariants = cva("h-full", {
|
|
22
|
+
defaultVariants: {
|
|
23
|
+
tone: "primary"
|
|
24
|
+
},
|
|
25
|
+
variants: {
|
|
26
|
+
tone: {
|
|
27
|
+
danger: "bg-destructive",
|
|
28
|
+
info: "bg-info",
|
|
29
|
+
neutral: "bg-muted-foreground",
|
|
30
|
+
primary: "bg-primary",
|
|
31
|
+
success: "bg-success",
|
|
32
|
+
warning: "bg-warning"
|
|
33
|
+
}
|
|
34
|
+
}
|
|
35
|
+
});
|
|
36
|
+
const progressBarCompleteVariants = cva("", {
|
|
37
|
+
defaultVariants: {
|
|
38
|
+
tone: "primary"
|
|
39
|
+
},
|
|
40
|
+
variants: {
|
|
41
|
+
tone: {
|
|
42
|
+
danger: "border-destructive/50 bg-destructive/5",
|
|
43
|
+
info: "border-info/50 bg-info/5",
|
|
44
|
+
neutral: "border-border bg-muted/30",
|
|
45
|
+
primary: "border-primary/50 bg-primary/5",
|
|
46
|
+
success: "border-success/50 bg-success/5",
|
|
47
|
+
warning: "border-warning/50 bg-warning/5"
|
|
48
|
+
}
|
|
49
|
+
}
|
|
50
|
+
});
|
|
51
|
+
const BLOCKS = Array.from({ length: 10 }, (_, index) => index + 1);
|
|
52
|
+
function countFilledBlocks(value, max) {
|
|
53
|
+
if (max <= 0) {
|
|
54
|
+
return 0;
|
|
55
|
+
}
|
|
56
|
+
const filled = Math.floor(value * BLOCKS.length / max);
|
|
57
|
+
return Math.min(Math.max(filled, 0), BLOCKS.length);
|
|
58
|
+
}
|
|
59
|
+
function renderValueText({
|
|
60
|
+
completedLabel,
|
|
61
|
+
isIndeterminate,
|
|
62
|
+
max,
|
|
63
|
+
percent,
|
|
64
|
+
showValue,
|
|
65
|
+
value,
|
|
66
|
+
valueLabel
|
|
67
|
+
}) {
|
|
68
|
+
if (valueLabel !== void 0) {
|
|
69
|
+
return valueLabel;
|
|
70
|
+
}
|
|
71
|
+
if (isIndeterminate) {
|
|
72
|
+
return null;
|
|
73
|
+
}
|
|
74
|
+
if (showValue) {
|
|
75
|
+
return `${percent}%`;
|
|
76
|
+
}
|
|
77
|
+
return /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
78
|
+
value,
|
|
79
|
+
" / ",
|
|
80
|
+
max,
|
|
81
|
+
" ",
|
|
82
|
+
completedLabel ?? ""
|
|
83
|
+
] });
|
|
84
|
+
}
|
|
85
|
+
function ProgressBarHeader(props) {
|
|
86
|
+
return /* @__PURE__ */ jsx("div", { className: "flex items-center justify-between mb-2 h-5", children: props.isLoading ? /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
87
|
+
/* @__PURE__ */ jsx("span", { className: "h-5 w-16 bg-secondary rounded animate-pulse motion-reduce:animate-none" }),
|
|
88
|
+
/* @__PURE__ */ jsx("span", { className: "h-5 w-24 bg-secondary rounded animate-pulse motion-reduce:animate-none" })
|
|
89
|
+
] }) : /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
90
|
+
/* @__PURE__ */ jsx("span", { className: "text-sm font-medium leading-5", id: props.labelId, children: props.label }),
|
|
91
|
+
/* @__PURE__ */ jsx("span", { className: "text-sm text-muted-foreground leading-5", children: renderValueText(props) })
|
|
92
|
+
] }) });
|
|
93
|
+
}
|
|
94
|
+
function ProgressBarTrack({
|
|
95
|
+
ariaLabel,
|
|
96
|
+
blocks,
|
|
97
|
+
isIndeterminate,
|
|
98
|
+
isLoading,
|
|
99
|
+
labelledBy,
|
|
100
|
+
max,
|
|
101
|
+
percent,
|
|
102
|
+
size,
|
|
103
|
+
tone,
|
|
104
|
+
value
|
|
105
|
+
}) {
|
|
106
|
+
const isValueKnown = !isLoading && !isIndeterminate;
|
|
107
|
+
const showBlocks = blocks === true && !isIndeterminate;
|
|
108
|
+
const filledBlocks = isValueKnown ? countFilledBlocks(value, max) : 0;
|
|
109
|
+
return /* @__PURE__ */ jsx(
|
|
110
|
+
"div",
|
|
111
|
+
{
|
|
112
|
+
"aria-label": labelledBy ? void 0 : ariaLabel ?? "Progress",
|
|
113
|
+
"aria-labelledby": labelledBy,
|
|
114
|
+
"aria-valuemax": max,
|
|
115
|
+
"aria-valuemin": 0,
|
|
116
|
+
"aria-valuenow": isValueKnown ? value : void 0,
|
|
117
|
+
className: cn(
|
|
118
|
+
progressBarTrackVariants({ size }),
|
|
119
|
+
showBlocks && "flex gap-0.5 bg-transparent"
|
|
120
|
+
),
|
|
121
|
+
role: "progressbar",
|
|
122
|
+
children: showBlocks ? BLOCKS.map((block) => /* @__PURE__ */ jsx(
|
|
123
|
+
"div",
|
|
124
|
+
{
|
|
125
|
+
className: cn(
|
|
126
|
+
"h-full flex-1 transition-colors duration-300 motion-reduce:transition-none",
|
|
127
|
+
block <= filledBlocks ? progressBarFillVariants({ tone }) : "bg-muted"
|
|
128
|
+
)
|
|
129
|
+
},
|
|
130
|
+
block
|
|
131
|
+
)) : /* @__PURE__ */ jsx(
|
|
132
|
+
"div",
|
|
133
|
+
{
|
|
134
|
+
className: cn(
|
|
135
|
+
progressBarFillVariants({ tone }),
|
|
136
|
+
isIndeterminate ? "w-full animate-shimmer motion-reduce:w-1/3 motion-reduce:animate-none" : "transition-all duration-300 motion-reduce:transition-none",
|
|
137
|
+
isLoading && "w-0"
|
|
138
|
+
),
|
|
139
|
+
style: isValueKnown ? { width: `${percent}%` } : void 0
|
|
140
|
+
}
|
|
141
|
+
)
|
|
142
|
+
}
|
|
143
|
+
);
|
|
144
|
+
}
|
|
145
|
+
const ProgressBar = ({
|
|
146
|
+
"aria-label": ariaLabel,
|
|
147
|
+
blocks,
|
|
4
148
|
className,
|
|
5
149
|
completedLabel,
|
|
6
150
|
currentLabel,
|
|
7
151
|
isComplete = false,
|
|
8
152
|
isLoading = false,
|
|
153
|
+
label,
|
|
9
154
|
max,
|
|
155
|
+
mode = "determinate",
|
|
156
|
+
ref,
|
|
10
157
|
showLabels = true,
|
|
11
|
-
|
|
12
|
-
|
|
158
|
+
showValue = false,
|
|
159
|
+
size,
|
|
160
|
+
tone,
|
|
161
|
+
value,
|
|
162
|
+
valueLabel
|
|
163
|
+
}) => {
|
|
164
|
+
const labelId = React.useId();
|
|
13
165
|
const percent = max > 0 ? Math.round(value / max * 100) : 0;
|
|
166
|
+
const isIndeterminate = mode === "indeterminate" && !isLoading && !isComplete;
|
|
167
|
+
const resolvedTone = tone ?? (isComplete ? "success" : "primary");
|
|
168
|
+
const labelledBy = showLabels && !isLoading && ariaLabel === void 0 ? labelId : void 0;
|
|
14
169
|
return /* @__PURE__ */ jsxs(
|
|
15
170
|
"div",
|
|
16
171
|
{
|
|
17
172
|
className: cn(
|
|
18
|
-
"border rounded-lg p-4 transition-colors",
|
|
19
|
-
isLoading && "border-border bg-muted/30",
|
|
20
|
-
!isLoading && isComplete && "border-green-500/50 bg-green-500/5",
|
|
21
|
-
!isLoading && !isComplete && "border-border bg-muted/30",
|
|
173
|
+
"border rounded-lg p-4 transition-colors motion-reduce:transition-none",
|
|
174
|
+
!isLoading && isComplete ? progressBarCompleteVariants({ tone: resolvedTone }) : "border-border bg-muted/30",
|
|
22
175
|
className
|
|
23
176
|
),
|
|
177
|
+
ref,
|
|
24
178
|
children: [
|
|
25
|
-
showLabels ? /* @__PURE__ */ jsx(
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
179
|
+
showLabels ? /* @__PURE__ */ jsx(
|
|
180
|
+
ProgressBarHeader,
|
|
181
|
+
{
|
|
182
|
+
completedLabel,
|
|
183
|
+
isIndeterminate,
|
|
184
|
+
isLoading,
|
|
185
|
+
label: label ?? currentLabel ?? (isComplete ? "Complete" : "Progress"),
|
|
186
|
+
labelId,
|
|
33
187
|
max,
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
188
|
+
percent,
|
|
189
|
+
showValue,
|
|
190
|
+
value,
|
|
191
|
+
valueLabel
|
|
192
|
+
}
|
|
193
|
+
) : null,
|
|
194
|
+
/* @__PURE__ */ jsx(
|
|
195
|
+
ProgressBarTrack,
|
|
40
196
|
{
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
197
|
+
ariaLabel,
|
|
198
|
+
blocks,
|
|
199
|
+
isIndeterminate,
|
|
200
|
+
isLoading,
|
|
201
|
+
labelledBy,
|
|
202
|
+
max,
|
|
203
|
+
percent,
|
|
204
|
+
size,
|
|
205
|
+
tone: resolvedTone,
|
|
206
|
+
value
|
|
48
207
|
}
|
|
49
|
-
)
|
|
208
|
+
)
|
|
50
209
|
]
|
|
51
210
|
}
|
|
52
211
|
);
|
|
53
|
-
}
|
|
212
|
+
};
|
|
213
|
+
ProgressBar.displayName = "ProgressBar";
|
|
54
214
|
export {
|
|
55
215
|
ProgressBar
|
|
56
216
|
};
|
|
@@ -0,0 +1,77 @@
|
|
|
1
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { cva } from "class-variance-authority";
|
|
3
|
+
import { cn } from "../../../lib/utils.js";
|
|
4
|
+
const pullQuoteVariants = cva(
|
|
5
|
+
"flex flex-col font-[family-name:var(--font-sans)] text-foreground",
|
|
6
|
+
{
|
|
7
|
+
defaultVariants: {
|
|
8
|
+
size: "md"
|
|
9
|
+
},
|
|
10
|
+
variants: {
|
|
11
|
+
size: {
|
|
12
|
+
lg: "gap-6",
|
|
13
|
+
md: "gap-4"
|
|
14
|
+
}
|
|
15
|
+
}
|
|
16
|
+
}
|
|
17
|
+
);
|
|
18
|
+
const pullQuoteRuleVariants = cva("block rounded-full bg-primary", {
|
|
19
|
+
defaultVariants: {
|
|
20
|
+
size: "md"
|
|
21
|
+
},
|
|
22
|
+
variants: {
|
|
23
|
+
size: {
|
|
24
|
+
lg: "h-1 w-16",
|
|
25
|
+
md: "h-0.5 w-12"
|
|
26
|
+
}
|
|
27
|
+
}
|
|
28
|
+
});
|
|
29
|
+
const pullQuoteBodyVariants = cva(
|
|
30
|
+
"font-[family-name:var(--font-display)] tracking-tight text-balance",
|
|
31
|
+
{
|
|
32
|
+
defaultVariants: {
|
|
33
|
+
size: "md"
|
|
34
|
+
},
|
|
35
|
+
variants: {
|
|
36
|
+
size: {
|
|
37
|
+
lg: "text-[length:var(--font-size-h2)] leading-[var(--line-height-h2)]",
|
|
38
|
+
md: "text-[length:var(--font-size-h4)] leading-[var(--line-height-h4)]"
|
|
39
|
+
}
|
|
40
|
+
}
|
|
41
|
+
}
|
|
42
|
+
);
|
|
43
|
+
const pullQuoteCiteVariants = cva("text-muted-foreground", {
|
|
44
|
+
defaultVariants: {
|
|
45
|
+
size: "md"
|
|
46
|
+
},
|
|
47
|
+
variants: {
|
|
48
|
+
size: {
|
|
49
|
+
lg: "text-[length:var(--font-size-body)] leading-[var(--line-height-body)]",
|
|
50
|
+
md: "text-[length:var(--font-size-body-sm)] leading-[var(--line-height-body-sm)]"
|
|
51
|
+
}
|
|
52
|
+
}
|
|
53
|
+
});
|
|
54
|
+
const PullQuote = ({
|
|
55
|
+
children,
|
|
56
|
+
cite,
|
|
57
|
+
className,
|
|
58
|
+
ref,
|
|
59
|
+
size = "md",
|
|
60
|
+
...props
|
|
61
|
+
}) => /* @__PURE__ */ jsxs(
|
|
62
|
+
"figure",
|
|
63
|
+
{
|
|
64
|
+
className: cn(pullQuoteVariants({ size }), className),
|
|
65
|
+
ref,
|
|
66
|
+
...props,
|
|
67
|
+
children: [
|
|
68
|
+
/* @__PURE__ */ jsx("span", { "aria-hidden": "true", className: pullQuoteRuleVariants({ size }) }),
|
|
69
|
+
/* @__PURE__ */ jsx("blockquote", { className: pullQuoteBodyVariants({ size }), children }),
|
|
70
|
+
cite ? /* @__PURE__ */ jsx("figcaption", { className: pullQuoteCiteVariants({ size }), children: cite }) : null
|
|
71
|
+
]
|
|
72
|
+
}
|
|
73
|
+
);
|
|
74
|
+
PullQuote.displayName = "PullQuote";
|
|
75
|
+
export {
|
|
76
|
+
PullQuote
|
|
77
|
+
};
|
|
@@ -39,7 +39,7 @@ function QuizOptionButton({
|
|
|
39
39
|
"button",
|
|
40
40
|
{
|
|
41
41
|
className: cn(
|
|
42
|
-
"w-full text-left p-3 rounded-md border transition-colors hover:bg-
|
|
42
|
+
"w-full text-left p-3 rounded-md border transition-colors hover:bg-secondary/50 focus:outline-none focus:ring-2 focus:ring-primary",
|
|
43
43
|
isSelected && !submitted && "border-primary bg-primary/10",
|
|
44
44
|
showResult && option.correct && "border-green-500 bg-green-500/10",
|
|
45
45
|
showResult && !option.correct && "border-red-500 bg-red-500/10",
|
|
@@ -141,7 +141,7 @@ function QuizActions({
|
|
|
141
141
|
return /* @__PURE__ */ jsx("div", { className: "flex gap-2", children: submitted ? /* @__PURE__ */ jsx(
|
|
142
142
|
"button",
|
|
143
143
|
{
|
|
144
|
-
className: "px-3 py-1.5 text-sm rounded-md border border-border hover:bg-
|
|
144
|
+
className: "px-3 py-1.5 text-sm rounded-md border border-border hover:bg-secondary transition-colors",
|
|
145
145
|
onClick: onReset,
|
|
146
146
|
type: "button",
|
|
147
147
|
children: "Try Again"
|
|
@@ -31,7 +31,7 @@ const Row = (props) => {
|
|
|
31
31
|
return /* @__PURE__ */ jsx(
|
|
32
32
|
"button",
|
|
33
33
|
{
|
|
34
|
-
className: "flex w-full items-center gap-2 rounded-md border border-transparent px-2 py-1.5 text-left transition-colors hover:border-border hover:bg-
|
|
34
|
+
className: "flex w-full items-center gap-2 rounded-md border border-transparent px-2 py-1.5 text-left transition-colors hover:border-border hover:bg-secondary/40 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring",
|
|
35
35
|
"data-relationship-direction": edge.direction,
|
|
36
36
|
"data-relationship-row": true,
|
|
37
37
|
onClick: handleActivateRelationship,
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
3
|
+
import { statusDotVariants } from "../../../lib/status-dot.js";
|
|
3
4
|
import { cn } from "../../../lib/utils.js";
|
|
4
5
|
const ROLE_LABEL = {
|
|
5
6
|
fallback: "Fallback",
|
|
@@ -7,9 +8,9 @@ const ROLE_LABEL = {
|
|
|
7
8
|
shadow: "Shadow"
|
|
8
9
|
};
|
|
9
10
|
const ROLE_TONE = {
|
|
10
|
-
fallback: "
|
|
11
|
-
primary: "
|
|
12
|
-
shadow: "
|
|
11
|
+
fallback: "warning",
|
|
12
|
+
primary: "success",
|
|
13
|
+
shadow: "neutral"
|
|
13
14
|
};
|
|
14
15
|
const DEFAULT_LABELS = {
|
|
15
16
|
empty: "No assignments",
|
|
@@ -30,14 +31,22 @@ const RowBody = (props) => {
|
|
|
30
31
|
return /* @__PURE__ */ jsxs("span", { className: "flex flex-1 flex-col gap-1", children: [
|
|
31
32
|
/* @__PURE__ */ jsxs("span", { className: "flex items-center justify-between gap-2", children: [
|
|
32
33
|
/* @__PURE__ */ jsx("span", { className: "truncate text-xs text-foreground", children: assignment.agent }),
|
|
33
|
-
/* @__PURE__ */
|
|
34
|
+
/* @__PURE__ */ jsxs(
|
|
34
35
|
"span",
|
|
35
36
|
{
|
|
36
|
-
className:
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
37
|
+
className: "inline-flex items-center gap-1.5 rounded-full border border-border bg-secondary px-1.5 py-0.5 text-[10px] uppercase tracking-wide text-foreground",
|
|
38
|
+
"data-routing-role-chip": true,
|
|
39
|
+
children: [
|
|
40
|
+
/* @__PURE__ */ jsx(
|
|
41
|
+
"span",
|
|
42
|
+
{
|
|
43
|
+
"aria-hidden": "true",
|
|
44
|
+
className: statusDotVariants({ tone: ROLE_TONE[assignment.role] }),
|
|
45
|
+
"data-routing-role-dot": true
|
|
46
|
+
}
|
|
47
|
+
),
|
|
48
|
+
ROLE_LABEL[assignment.role]
|
|
49
|
+
]
|
|
41
50
|
}
|
|
42
51
|
)
|
|
43
52
|
] }),
|
|
@@ -45,7 +54,7 @@ const RowBody = (props) => {
|
|
|
45
54
|
"span",
|
|
46
55
|
{
|
|
47
56
|
"aria-hidden": "true",
|
|
48
|
-
className: "h-1 w-full overflow-hidden rounded-full bg-
|
|
57
|
+
className: "h-1 w-full overflow-hidden rounded-full bg-secondary/40",
|
|
49
58
|
children: /* @__PURE__ */ jsx(
|
|
50
59
|
"span",
|
|
51
60
|
{
|
|
@@ -66,7 +75,7 @@ const Row = (props) => {
|
|
|
66
75
|
return /* @__PURE__ */ jsx(
|
|
67
76
|
"button",
|
|
68
77
|
{
|
|
69
|
-
className: "flex w-full items-center gap-2 rounded-md border border-transparent px-2 py-1.5 text-left transition-colors hover:border-border hover:bg-
|
|
78
|
+
className: "flex w-full items-center gap-2 rounded-md border border-transparent px-2 py-1.5 text-left transition-colors hover:border-border hover:bg-secondary/40 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring",
|
|
70
79
|
"data-routing-assignment": assignment.id,
|
|
71
80
|
"data-routing-role": assignment.role,
|
|
72
81
|
onClick: handleActivateAssignment,
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import { jsx } from "react/jsx-runtime";
|
|
2
|
+
import { cva } from "class-variance-authority";
|
|
3
|
+
import { cn } from "../../../lib/utils.js";
|
|
4
|
+
const scrimVariants = cva("absolute inset-0", {
|
|
5
|
+
defaultVariants: {
|
|
6
|
+
level: "dim"
|
|
7
|
+
},
|
|
8
|
+
variants: {
|
|
9
|
+
level: {
|
|
10
|
+
dim: "bg-black/50",
|
|
11
|
+
strong: "bg-black/80"
|
|
12
|
+
}
|
|
13
|
+
}
|
|
14
|
+
});
|
|
15
|
+
const Scrim = ({
|
|
16
|
+
className,
|
|
17
|
+
level,
|
|
18
|
+
ref,
|
|
19
|
+
...props
|
|
20
|
+
}) => /* @__PURE__ */ jsx(
|
|
21
|
+
"div",
|
|
22
|
+
{
|
|
23
|
+
"aria-hidden": "true",
|
|
24
|
+
className: cn(scrimVariants({ level }), className),
|
|
25
|
+
ref,
|
|
26
|
+
...props
|
|
27
|
+
}
|
|
28
|
+
);
|
|
29
|
+
Scrim.displayName = "Scrim";
|
|
30
|
+
export {
|
|
31
|
+
Scrim
|
|
32
|
+
};
|
|
@@ -4,7 +4,7 @@ import * as ToggleGroupPrimitive from "@radix-ui/react-toggle-group";
|
|
|
4
4
|
import { cva } from "class-variance-authority";
|
|
5
5
|
import { cn } from "../../../lib/utils.js";
|
|
6
6
|
const segmentedControlVariants = cva(
|
|
7
|
-
"inline-flex w-full items-center rounded-lg bg-
|
|
7
|
+
"inline-flex w-full items-center rounded-lg bg-secondary p-1 text-muted-foreground",
|
|
8
8
|
{
|
|
9
9
|
defaultVariants: {
|
|
10
10
|
size: "default"
|
|
@@ -19,7 +19,7 @@ const segmentedControlVariants = cva(
|
|
|
19
19
|
}
|
|
20
20
|
);
|
|
21
21
|
const segmentedControlItemVariants = cva(
|
|
22
|
-
"inline-flex flex-1 items-center justify-center rounded-md px-3 text-sm font-medium whitespace-nowrap transition-all outline-none ring-offset-background focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 data-[state=on]:bg-background data-[state=on]:text-foreground data-[state=on]:shadow-sm",
|
|
22
|
+
"inline-flex flex-1 items-center justify-center rounded-md px-3 text-sm font-medium whitespace-nowrap transition-all motion-reduce:transition-none outline-none ring-offset-background focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 data-[state=on]:bg-background data-[state=on]:text-foreground data-[state=on]:shadow-sm",
|
|
23
23
|
{
|
|
24
24
|
defaultVariants: {
|
|
25
25
|
size: "default"
|
|
@@ -15,7 +15,7 @@ const SelectTrigger = ({
|
|
|
15
15
|
SelectPrimitive.Trigger,
|
|
16
16
|
{
|
|
17
17
|
className: cn(
|
|
18
|
-
"flex h-10 w-full items-center justify-between rounded-md border border-input bg-background px-3 py-2 text-sm ring-offset-background placeholder:text-muted-foreground focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50 [&>span]:line-clamp-1",
|
|
18
|
+
"flex h-10 w-full items-center justify-between rounded-md border border-input bg-background px-3 py-2 text-sm ring-offset-background placeholder:text-muted-foreground focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 aria-[invalid=true]:border-destructive disabled:cursor-not-allowed disabled:opacity-50 [&>span]:line-clamp-1",
|
|
19
19
|
className
|
|
20
20
|
),
|
|
21
21
|
ref,
|
|
@@ -71,7 +71,7 @@ const SelectContent = ({
|
|
|
71
71
|
SelectPrimitive.Content,
|
|
72
72
|
{
|
|
73
73
|
className: cn(
|
|
74
|
-
"relative z-50 max-h-96 min-w-[8rem] overflow-hidden rounded-md border bg-popover text-popover-foreground shadow-md data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",
|
|
74
|
+
"relative z-50 max-h-96 min-w-[8rem] overflow-hidden rounded-md border bg-popover text-popover-foreground shadow-md motion-safe:data-[state=open]:animate-in motion-safe:data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",
|
|
75
75
|
position === "popper" && "data-[side=bottom]:translate-y-1 data-[side=left]:-translate-x-1 data-[side=right]:translate-x-1 data-[side=top]:-translate-y-1",
|
|
76
76
|
className
|
|
77
77
|
),
|
|
@@ -136,7 +136,7 @@ const SelectSeparator = ({
|
|
|
136
136
|
}) => /* @__PURE__ */ jsx(
|
|
137
137
|
SelectPrimitive.Separator,
|
|
138
138
|
{
|
|
139
|
-
className: cn("-m-1 h-px bg-
|
|
139
|
+
className: cn("-m-1 h-px bg-border", className),
|
|
140
140
|
ref,
|
|
141
141
|
...props
|
|
142
142
|
}
|
|
@@ -43,6 +43,7 @@ const sheetVariants = cva(
|
|
|
43
43
|
const SheetContent = ({
|
|
44
44
|
children,
|
|
45
45
|
className,
|
|
46
|
+
labels,
|
|
46
47
|
ref,
|
|
47
48
|
side = "right",
|
|
48
49
|
...props
|
|
@@ -55,9 +56,9 @@ const SheetContent = ({
|
|
|
55
56
|
ref,
|
|
56
57
|
...props,
|
|
57
58
|
children: [
|
|
58
|
-
/* @__PURE__ */ jsxs(SheetPrimitive.Close, { className: "absolute right-
|
|
59
|
+
/* @__PURE__ */ jsxs(SheetPrimitive.Close, { className: "absolute right-3 top-3 inline-flex size-6 items-center justify-center rounded-sm opacity-70 ring-offset-background transition-opacity hover:opacity-100 focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:pointer-events-none data-[state=open]:bg-secondary", children: [
|
|
59
60
|
/* @__PURE__ */ jsx(X, { className: "size-4" }),
|
|
60
|
-
/* @__PURE__ */ jsx("span", { className: "sr-only", children: "Close" })
|
|
61
|
+
/* @__PURE__ */ jsx("span", { className: "sr-only", children: labels?.close ?? "Close" })
|
|
61
62
|
] }),
|
|
62
63
|
children
|
|
63
64
|
]
|