@vllnt/ui 0.4.0-canary.sha227ddb3 → 0.4.0-canary.sha236ae3a
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 +59 -0
- 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/bottom-activity-strip/bottom-activity-strip.js +1 -1
- package/dist/components/atoms/breadcrumb/breadcrumb.js +1 -1
- package/dist/components/atoms/checklist/checklist.js +2 -2
- package/dist/components/atoms/curriculum/curriculum.js +4 -4
- package/dist/components/atoms/drawer/drawer.js +1 -1
- package/dist/components/atoms/dropdown-menu/dropdown-menu.js +1 -1
- 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/jarvis-dock/jarvis-dock.js +2 -2
- 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/policy-delivery-panel/policy-delivery-panel.js +1 -1
- package/dist/components/atoms/presence-stack/presence-stack.js +1 -1
- package/dist/components/atoms/progress-bar/progress-bar.js +15 -12
- 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 +2 -2
- package/dist/components/atoms/segmented-control/segmented-control.js +1 -1
- package/dist/components/atoms/select/select.js +1 -1
- package/dist/components/atoms/skeleton/skeleton.js +1 -1
- package/dist/components/atoms/stepper/stepper.js +1 -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 +1 -1
- package/dist/components/atoms/thread-bubble/thread-bubble.js +1 -1
- package/dist/components/atoms/threshold-ring/threshold-ring.js +1 -1
- package/dist/components/atoms/timeline-scrubber/timeline-scrubber.js +1 -1
- 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/molecules/civilization-card/civilization-card.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/countdown-timer/countdown-timer.js +1 -1
- 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/pricing-table/pricing-table.js +1 -1
- package/dist/components/molecules/progress-tracker/progress-tracker.js +1 -1
- package/dist/components/molecules/sidebar/sidebar.js +24 -9
- package/dist/components/molecules/tour/tour.js +1 -1
- 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/activity-heatmap/activity-heatmap.js +1 -1
- 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/slideshow/slideshow.js +6 -6
- 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 +13 -1
- package/package.json +1 -1
- package/styles.css +3 -3
- package/themes/default.css +3 -3
- package/themes/products.css +3 -3
package/CHANGELOG.md
CHANGED
|
@@ -6,6 +6,43 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/),
|
|
|
6
6
|
|
|
7
7
|
## [Unreleased]
|
|
8
8
|
|
|
9
|
+
### Changed
|
|
10
|
+
|
|
11
|
+
- **Dark surfaces are pure black** - the default dark theme now renders
|
|
12
|
+
`--background`, `--muted`, `--card` and `--popover` as `0 0 0` (#000000).
|
|
13
|
+
Hairline borders separate the surfaces: `--border`, `--secondary` and
|
|
14
|
+
`--accent` stay `0.2686` (#262626), and `--input` is unchanged. Before,
|
|
15
|
+
`--muted` was `0.2686` (#262626) and `--card` / `--popover` were `0.1445`
|
|
16
|
+
(#0a0a0a). A `bg-card` or `bg-popover` surface needs a `border` to show its
|
|
17
|
+
edge; every shipped one has it, and a test now fails on one that does not.
|
|
18
|
+
The separators in `DropdownMenu`, `Menubar` and `Select` draw with
|
|
19
|
+
`bg-border` instead of `bg-muted`, which is the page color now, and a test
|
|
20
|
+
fails on any one-pixel divider that uses `bg-muted`. Light mode is unchanged.
|
|
21
|
+
Themes that override these roles (presets, Maia) keep their values; PaaS and
|
|
22
|
+
any app that reads the dark `--muted`, `--card` or `--popover` directly get
|
|
23
|
+
black.
|
|
24
|
+
- **Hover, selected and data-state fills use `secondary`** - 32 component files
|
|
25
|
+
(`Table`, `Tabs` pill, `Toggle`, `Slideshow`, `FilterBar` and others) used
|
|
26
|
+
`bg-muted` for that feedback, which is now the page color in dark.
|
|
27
|
+
They use `bg-secondary` with the same opacity. In the default and PaaS themes
|
|
28
|
+
the fill is the same color as before in light and dark, because `--secondary`
|
|
29
|
+
equals the old `--muted` there. Theme presets keep a quiet neutral
|
|
30
|
+
`--secondary` (their `--accent` is a brand color), so text on these fills
|
|
31
|
+
stays at 6.65 to 12.53:1 in dark. The Maia theme has its own dark `--muted`
|
|
32
|
+
(`0.2002`) and a core dark `--secondary` (`0.2686`), so its dark hover fills
|
|
33
|
+
are one step lighter than before.
|
|
34
|
+
`SegmentedControl`, `ViewSwitcher`, `WorkspaceSwitcher` and the `PricingTable`
|
|
35
|
+
period toggle draw their track with `bg-secondary` for the same reason: the
|
|
36
|
+
selected segment is `bg-background` on that track.
|
|
37
|
+
- **Skeletons, tracks and handles use `secondary`** - 29 `bg-muted` fills in 23
|
|
38
|
+
component files were the whole visual of their element: `Skeleton`, the
|
|
39
|
+
`ProgressBar`, `Meter`, `Tour`, `Checklist`, `UsageBreakdown` and other
|
|
40
|
+
progress, meter and usage tracks, the `Drawer` handle, the empty cells of
|
|
41
|
+
`ActivityHeatmap` and the neutral `GanttChart` bar. They use `bg-secondary`
|
|
42
|
+
(#262626) with the same opacity, because `bg-muted` is the page color in dark
|
|
43
|
+
and they would disappear. Chips, code spans and panels keep `bg-muted`: their
|
|
44
|
+
text and border carry them. A test fails on a `bg-muted` skeleton or bar.
|
|
45
|
+
|
|
9
46
|
### Added
|
|
10
47
|
|
|
11
48
|
- **Product themes stylesheet** - `@vllnt/ui/themes/products.css` ships the
|
|
@@ -19,6 +56,28 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/),
|
|
|
19
56
|
(`success`, `warning`, `info`, `diff.added`, `diff.removed`) in the preset.
|
|
20
57
|
- **Label type step** - `--font-size-label`, `--line-height-label` and
|
|
21
58
|
`--font-weight-label`.
|
|
59
|
+
- **Sidebar `pathname` prop** - names the page the sidebar marks as current.
|
|
60
|
+
It defaults to the router's pathname, so existing usage is unchanged. Pass
|
|
61
|
+
it when the URL the visitor sees differs from the route that renders, such as
|
|
62
|
+
a prerendered locale or variant route, instead of overriding the router's
|
|
63
|
+
pathname context.
|
|
64
|
+
- **Sidebar `prefetch` prop** - set it to `false` to stop the sidebar's links
|
|
65
|
+
from prefetching their pages. Left unset, the links keep the router's default
|
|
66
|
+
prefetching, so existing usage is unchanged. A sidebar with dozens of links
|
|
67
|
+
in view otherwise prefetches every one of them on page load.
|
|
68
|
+
|
|
69
|
+
### Fixed
|
|
70
|
+
|
|
71
|
+
- **Tap targets** - the NavbarSaas links, the Breadcrumb crumbs, the
|
|
72
|
+
TableOfContents buttons and the Sidebar family heading link are at least
|
|
73
|
+
24 px tall (WCAG 2.5.8); they were 20 px.
|
|
74
|
+
|
|
75
|
+
### Fixed
|
|
76
|
+
|
|
77
|
+
- **Accordion accessibility** - each trigger now has `aria-controls` pointing
|
|
78
|
+
at its panel, and each panel is a `region` labelled by its trigger. Closed
|
|
79
|
+
panels are `inert`, so screen readers no longer read closed answers and Tab
|
|
80
|
+
skips links inside them. The open and close animation is unchanged.
|
|
22
81
|
|
|
23
82
|
## [0.4.0] - 2026-10-31
|
|
24
83
|
|
|
@@ -1,8 +1,22 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
3
|
-
import {
|
|
3
|
+
import {
|
|
4
|
+
createContext,
|
|
5
|
+
use,
|
|
6
|
+
useCallback,
|
|
7
|
+
useId,
|
|
8
|
+
useMemo,
|
|
9
|
+
useState
|
|
10
|
+
} from "react";
|
|
4
11
|
import { cn } from "../../../lib/utils.js";
|
|
5
12
|
const AccordionContext = createContext(null);
|
|
13
|
+
function getPartId(baseId, part, value) {
|
|
14
|
+
const key = value.replaceAll(
|
|
15
|
+
/[^\dA-Za-z-]/g,
|
|
16
|
+
(character) => `_${(character.codePointAt(0) ?? 0).toString(16)}_`
|
|
17
|
+
);
|
|
18
|
+
return `${baseId}-${part}-${key}`;
|
|
19
|
+
}
|
|
6
20
|
function useAccordionContext() {
|
|
7
21
|
const context = use(AccordionContext);
|
|
8
22
|
if (!context) {
|
|
@@ -16,6 +30,7 @@ function Accordion({
|
|
|
16
30
|
defaultValue,
|
|
17
31
|
type = "single"
|
|
18
32
|
}) {
|
|
33
|
+
const baseId = useId();
|
|
19
34
|
const [openItems, setOpenItems] = useState(() => {
|
|
20
35
|
if (!defaultValue) return /* @__PURE__ */ new Set();
|
|
21
36
|
if (Array.isArray(defaultValue)) return new Set(defaultValue);
|
|
@@ -39,8 +54,8 @@ function Accordion({
|
|
|
39
54
|
[type]
|
|
40
55
|
);
|
|
41
56
|
const contextValue = useMemo(
|
|
42
|
-
() => ({ openItems, toggleItem, type }),
|
|
43
|
-
[openItems, toggleItem, type]
|
|
57
|
+
() => ({ baseId, openItems, toggleItem, type }),
|
|
58
|
+
[baseId, openItems, toggleItem, type]
|
|
44
59
|
);
|
|
45
60
|
return /* @__PURE__ */ jsx(AccordionContext.Provider, { value: contextValue, children: /* @__PURE__ */ jsx(
|
|
46
61
|
"div",
|
|
@@ -76,18 +91,20 @@ function AccordionTrigger({
|
|
|
76
91
|
icon,
|
|
77
92
|
value
|
|
78
93
|
}) {
|
|
79
|
-
const { openItems, toggleItem } = useAccordionContext();
|
|
94
|
+
const { baseId, openItems, toggleItem } = useAccordionContext();
|
|
80
95
|
const isOpen = openItems.has(value);
|
|
81
96
|
return /* @__PURE__ */ jsxs(
|
|
82
97
|
"button",
|
|
83
98
|
{
|
|
99
|
+
"aria-controls": getPartId(baseId, "content", value),
|
|
84
100
|
"aria-expanded": isOpen,
|
|
85
101
|
className: cn(
|
|
86
102
|
"w-full flex items-center justify-between p-4 text-left font-medium transition-colors",
|
|
87
|
-
"hover:bg-
|
|
88
|
-
isOpen && "bg-
|
|
103
|
+
"hover:bg-secondary/50",
|
|
104
|
+
isOpen && "bg-secondary/30",
|
|
89
105
|
className
|
|
90
106
|
),
|
|
107
|
+
id: getPartId(baseId, "trigger", value),
|
|
91
108
|
onClick: () => {
|
|
92
109
|
toggleItem(value);
|
|
93
110
|
},
|
|
@@ -134,15 +151,19 @@ function AccordionContent({
|
|
|
134
151
|
className,
|
|
135
152
|
value
|
|
136
153
|
}) {
|
|
137
|
-
const { openItems } = useAccordionContext();
|
|
154
|
+
const { baseId, openItems } = useAccordionContext();
|
|
138
155
|
const isOpen = openItems.has(value);
|
|
139
156
|
return /* @__PURE__ */ jsx(
|
|
140
157
|
"div",
|
|
141
158
|
{
|
|
159
|
+
"aria-labelledby": getPartId(baseId, "trigger", value),
|
|
142
160
|
className: cn(
|
|
143
161
|
"overflow-hidden transition-all duration-200",
|
|
144
162
|
isOpen ? "max-h-[1000px] opacity-100" : "max-h-0 opacity-0"
|
|
145
163
|
),
|
|
164
|
+
id: getPartId(baseId, "content", value),
|
|
165
|
+
inert: !isOpen,
|
|
166
|
+
role: "region",
|
|
146
167
|
children: /* @__PURE__ */ jsx(
|
|
147
168
|
"div",
|
|
148
169
|
{
|
|
@@ -296,7 +296,7 @@ const AgentStepProgress = ({
|
|
|
296
296
|
"aria-valuemax": 100,
|
|
297
297
|
"aria-valuemin": 0,
|
|
298
298
|
"aria-valuenow": clamped,
|
|
299
|
-
className: cn("h-1.5 w-full rounded-full bg-
|
|
299
|
+
className: cn("h-1.5 w-full rounded-full bg-secondary", className),
|
|
300
300
|
ref,
|
|
301
301
|
role: "progressbar",
|
|
302
302
|
...rest,
|
|
@@ -15,7 +15,7 @@ const AISourceCitation = ({
|
|
|
15
15
|
"a",
|
|
16
16
|
{
|
|
17
17
|
className: cn(
|
|
18
|
-
"group inline-flex max-w-full flex-col gap-2 rounded-xl border border-border/70 bg-background px-3 py-2 text-left shadow-sm transition-colors hover:bg-
|
|
18
|
+
"group inline-flex max-w-full flex-col gap-2 rounded-xl border border-border/70 bg-background px-3 py-2 text-left shadow-sm transition-colors hover:bg-secondary/40 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2",
|
|
19
19
|
className
|
|
20
20
|
),
|
|
21
21
|
href,
|
|
@@ -37,7 +37,7 @@ const Chip = (props) => {
|
|
|
37
37
|
return /* @__PURE__ */ jsx(
|
|
38
38
|
"button",
|
|
39
39
|
{
|
|
40
|
-
className: "flex items-center rounded-full border border-border bg-background px-2 py-1 text-[11px] transition-colors hover:bg-
|
|
40
|
+
className: "flex items-center rounded-full border border-border bg-background px-2 py-1 text-[11px] transition-colors hover:bg-secondary/40 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring",
|
|
41
41
|
"data-strip-event": event.id,
|
|
42
42
|
"data-strip-event-tone": tone,
|
|
43
43
|
onClick: handleActivateEvent,
|
|
@@ -37,7 +37,7 @@ function ChecklistItemRow({
|
|
|
37
37
|
"button",
|
|
38
38
|
{
|
|
39
39
|
className: cn(
|
|
40
|
-
"w-full flex items-start gap-3 p-2 rounded-md text-left transition-colors hover:bg-
|
|
40
|
+
"w-full flex items-start gap-3 p-2 rounded-md text-left transition-colors hover:bg-secondary/50",
|
|
41
41
|
isChecked && "opacity-60"
|
|
42
42
|
),
|
|
43
43
|
onClick: onToggle,
|
|
@@ -192,7 +192,7 @@ function Checklist({
|
|
|
192
192
|
total: items.length
|
|
193
193
|
}
|
|
194
194
|
),
|
|
195
|
-
/* @__PURE__ */ jsx("div", { className: "h-1 bg-
|
|
195
|
+
/* @__PURE__ */ jsx("div", { className: "h-1 bg-secondary rounded-full mb-4 overflow-hidden", children: /* @__PURE__ */ jsx(
|
|
196
196
|
"div",
|
|
197
197
|
{
|
|
198
198
|
className: cn(
|
|
@@ -78,7 +78,7 @@ function ProgressBar({
|
|
|
78
78
|
}) {
|
|
79
79
|
if (total === 0) return null;
|
|
80
80
|
return /* @__PURE__ */ jsxs("div", { className: "mt-1 flex items-center gap-2", children: [
|
|
81
|
-
/* @__PURE__ */ jsx("div", { className: "h-1.5 max-w-[120px] flex-1 overflow-hidden rounded-full bg-
|
|
81
|
+
/* @__PURE__ */ jsx("div", { className: "h-1.5 max-w-[120px] flex-1 overflow-hidden rounded-full bg-secondary", children: /* @__PURE__ */ jsx(
|
|
82
82
|
"div",
|
|
83
83
|
{
|
|
84
84
|
className: "h-full rounded-full bg-primary transition-all",
|
|
@@ -144,8 +144,8 @@ function ModuleTrigger({
|
|
|
144
144
|
"aria-expanded": isExpanded,
|
|
145
145
|
className: cn(
|
|
146
146
|
"w-full flex items-start justify-between gap-3 rounded-md px-6 py-4 text-left transition-colors",
|
|
147
|
-
"hover:bg-
|
|
148
|
-
isExpanded && "bg-
|
|
147
|
+
"hover:bg-secondary/50 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-primary focus-visible:ring-offset-2",
|
|
148
|
+
isExpanded && "bg-secondary/30"
|
|
149
149
|
),
|
|
150
150
|
onClick: toggle,
|
|
151
151
|
type: "button",
|
|
@@ -297,7 +297,7 @@ function CurriculumLesson({
|
|
|
297
297
|
className: cn(
|
|
298
298
|
"flex items-center gap-3 px-6 py-3 pl-10 text-sm transition-colors",
|
|
299
299
|
isLocked ? "cursor-not-allowed opacity-60" : "",
|
|
300
|
-
!isLocked && href ? "cursor-pointer hover:bg-
|
|
300
|
+
!isLocked && href ? "cursor-pointer hover:bg-secondary/40" : "",
|
|
301
301
|
className
|
|
302
302
|
),
|
|
303
303
|
children: [
|
|
@@ -48,7 +48,7 @@ const DrawerContent = ({
|
|
|
48
48
|
ref,
|
|
49
49
|
...props,
|
|
50
50
|
children: [
|
|
51
|
-
/* @__PURE__ */ jsx("div", { className: "mx-auto mt-4 h-2 w-[100px] rounded-full bg-
|
|
51
|
+
/* @__PURE__ */ jsx("div", { className: "mx-auto mt-4 h-2 w-[100px] rounded-full bg-secondary" }),
|
|
52
52
|
children
|
|
53
53
|
]
|
|
54
54
|
}
|
|
@@ -18,7 +18,7 @@ const GlassProgress = ({
|
|
|
18
18
|
"aria-valuemin": 0,
|
|
19
19
|
"aria-valuenow": clamped,
|
|
20
20
|
className: cn(
|
|
21
|
-
"relative h-2 w-full overflow-hidden rounded-full border border-border/50 bg-
|
|
21
|
+
"relative h-2 w-full overflow-hidden rounded-full border border-border/50 bg-secondary/40 backdrop-blur",
|
|
22
22
|
className
|
|
23
23
|
),
|
|
24
24
|
ref,
|
|
@@ -20,7 +20,7 @@ const ActionButton = (props) => {
|
|
|
20
20
|
return /* @__PURE__ */ jsxs(
|
|
21
21
|
"button",
|
|
22
22
|
{
|
|
23
|
-
className: "group relative flex size-12 flex-col items-center justify-center gap-0.5 rounded-md border border-transparent text-[10px] uppercase tracking-wide text-muted-foreground transition-colors hover:border-border hover:bg-
|
|
23
|
+
className: "group relative flex size-12 flex-col items-center justify-center gap-0.5 rounded-md border border-transparent text-[10px] uppercase tracking-wide text-muted-foreground transition-colors hover:border-border hover:bg-secondary/40 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring",
|
|
24
24
|
"data-jarvis-action": action.id,
|
|
25
25
|
"data-jarvis-tone": tone,
|
|
26
26
|
onClick: handleActivateAction,
|
|
@@ -78,7 +78,7 @@ const JarvisDock = ({
|
|
|
78
78
|
"button",
|
|
79
79
|
{
|
|
80
80
|
"aria-label": resolvedLabels.paletteTrigger,
|
|
81
|
-
className: "flex size-12 items-center justify-center rounded-md border border-transparent text-base text-muted-foreground transition-colors hover:border-border hover:bg-
|
|
81
|
+
className: "flex size-12 items-center justify-center rounded-md border border-transparent text-base text-muted-foreground transition-colors hover:border-border hover:bg-secondary/40 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring",
|
|
82
82
|
"data-jarvis-palette-trigger": true,
|
|
83
83
|
onClick: handlePalette,
|
|
84
84
|
type: "button",
|
|
@@ -100,7 +100,7 @@ function KeyboardShortcutsHelpImpl({
|
|
|
100
100
|
"button",
|
|
101
101
|
{
|
|
102
102
|
"aria-label": "Close shortcuts help",
|
|
103
|
-
className: "flex size-8 items-center justify-center rounded-md hover:bg-
|
|
103
|
+
className: "flex size-8 items-center justify-center rounded-md hover:bg-secondary",
|
|
104
104
|
onClick: onClose,
|
|
105
105
|
ref: closeButtonRef,
|
|
106
106
|
type: "button",
|
|
@@ -43,7 +43,7 @@ const Meter = ({
|
|
|
43
43
|
"aria-valuenow": current,
|
|
44
44
|
"aria-valuetext": valueText,
|
|
45
45
|
className: cn(
|
|
46
|
-
"h-2 w-full overflow-hidden rounded-full bg-
|
|
46
|
+
"h-2 w-full overflow-hidden rounded-full bg-secondary",
|
|
47
47
|
segmentCount > 0 && "flex gap-0.5 bg-transparent",
|
|
48
48
|
className
|
|
49
49
|
),
|
|
@@ -55,7 +55,7 @@ const Meter = ({
|
|
|
55
55
|
{
|
|
56
56
|
className: cn(
|
|
57
57
|
"h-full flex-1 rounded-full",
|
|
58
|
-
index < filledSegments ? meterFillVariants({ variant }) : "bg-
|
|
58
|
+
index < filledSegments ? meterFillVariants({ variant }) : "bg-secondary"
|
|
59
59
|
)
|
|
60
60
|
},
|
|
61
61
|
`meter-segment-${index}`
|
|
@@ -43,7 +43,7 @@ const Row = (props) => {
|
|
|
43
43
|
return /* @__PURE__ */ jsx(
|
|
44
44
|
"button",
|
|
45
45
|
{
|
|
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-
|
|
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-secondary/40 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring",
|
|
47
47
|
"data-policy-row": policy.id,
|
|
48
48
|
"data-policy-status": policy.status,
|
|
49
49
|
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,
|
|
@@ -3,18 +3,21 @@ import { Fragment, jsx, jsxs } from "react/jsx-runtime";
|
|
|
3
3
|
import * as React from "react";
|
|
4
4
|
import { cva } from "class-variance-authority";
|
|
5
5
|
import { cn } from "../../../lib/utils.js";
|
|
6
|
-
const progressBarTrackVariants = cva(
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
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
|
+
}
|
|
15
18
|
}
|
|
16
19
|
}
|
|
17
|
-
|
|
20
|
+
);
|
|
18
21
|
const progressBarFillVariants = cva("h-full", {
|
|
19
22
|
defaultVariants: {
|
|
20
23
|
tone: "primary"
|
|
@@ -73,8 +76,8 @@ function renderValueText({
|
|
|
73
76
|
}
|
|
74
77
|
function ProgressBarHeader(props) {
|
|
75
78
|
return /* @__PURE__ */ jsx("div", { className: "flex items-center justify-between mb-2 h-5", children: props.isLoading ? /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
76
|
-
/* @__PURE__ */ jsx("span", { className: "h-5 w-16 bg-
|
|
77
|
-
/* @__PURE__ */ jsx("span", { className: "h-5 w-24 bg-
|
|
79
|
+
/* @__PURE__ */ jsx("span", { className: "h-5 w-16 bg-secondary rounded animate-pulse motion-reduce:animate-none" }),
|
|
80
|
+
/* @__PURE__ */ jsx("span", { className: "h-5 w-24 bg-secondary rounded animate-pulse motion-reduce:animate-none" })
|
|
78
81
|
] }) : /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
79
82
|
/* @__PURE__ */ jsx("span", { className: "text-sm font-medium leading-5", id: props.labelId, children: props.label }),
|
|
80
83
|
/* @__PURE__ */ jsx("span", { className: "text-sm text-muted-foreground leading-5", children: renderValueText(props) })
|
|
@@ -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,
|
|
@@ -45,7 +45,7 @@ const RowBody = (props) => {
|
|
|
45
45
|
"span",
|
|
46
46
|
{
|
|
47
47
|
"aria-hidden": "true",
|
|
48
|
-
className: "h-1 w-full overflow-hidden rounded-full bg-
|
|
48
|
+
className: "h-1 w-full overflow-hidden rounded-full bg-secondary/40",
|
|
49
49
|
children: /* @__PURE__ */ jsx(
|
|
50
50
|
"span",
|
|
51
51
|
{
|
|
@@ -66,7 +66,7 @@ const Row = (props) => {
|
|
|
66
66
|
return /* @__PURE__ */ jsx(
|
|
67
67
|
"button",
|
|
68
68
|
{
|
|
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-
|
|
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-secondary/40 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring",
|
|
70
70
|
"data-routing-assignment": assignment.id,
|
|
71
71
|
"data-routing-role": assignment.role,
|
|
72
72
|
onClick: handleActivateAssignment,
|
|
@@ -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"
|
|
@@ -39,7 +39,7 @@ function StepperItem({
|
|
|
39
39
|
{
|
|
40
40
|
className: cn(
|
|
41
41
|
"flex w-full items-start gap-3 rounded-lg text-left transition-colors",
|
|
42
|
-
clickable ? "hover:bg-
|
|
42
|
+
clickable ? "hover:bg-secondary/40 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring" : "cursor-default",
|
|
43
43
|
isVertical ? "p-2" : "flex-col items-start p-2 md:p-0"
|
|
44
44
|
),
|
|
45
45
|
disabled: !clickable,
|
|
@@ -51,7 +51,7 @@ function TableOfContents({
|
|
|
51
51
|
"button",
|
|
52
52
|
{
|
|
53
53
|
className: cn(
|
|
54
|
-
"block text-left text-sm transition-colors",
|
|
54
|
+
"block min-h-6 text-left text-sm transition-colors",
|
|
55
55
|
"hover:text-foreground",
|
|
56
56
|
activeSection === section.id ? "text-foreground font-medium" : "text-muted-foreground"
|
|
57
57
|
),
|
|
@@ -42,7 +42,7 @@ function TocHeader({
|
|
|
42
42
|
"button",
|
|
43
43
|
{
|
|
44
44
|
"aria-label": "Close table of contents",
|
|
45
|
-
className: "flex size-8 items-center justify-center rounded-md hover:bg-
|
|
45
|
+
className: "flex size-8 items-center justify-center rounded-md hover:bg-secondary",
|
|
46
46
|
onClick: onClose,
|
|
47
47
|
ref: closeButtonRef,
|
|
48
48
|
type: "button",
|
|
@@ -73,7 +73,7 @@ function TocFooter({ onReset, resetLabel }) {
|
|
|
73
73
|
return /* @__PURE__ */ jsx("div", { className: "border-t border-border px-4 py-3", children: /* @__PURE__ */ jsx(
|
|
74
74
|
"button",
|
|
75
75
|
{
|
|
76
|
-
className: "w-full rounded-md border border-border px-3 py-2 text-sm text-muted-foreground hover:bg-
|
|
76
|
+
className: "w-full rounded-md border border-border px-3 py-2 text-sm text-muted-foreground hover:bg-secondary hover:text-foreground transition-colors",
|
|
77
77
|
onClick: onReset,
|
|
78
78
|
type: "button",
|
|
79
79
|
children: resetLabel
|
|
@@ -98,7 +98,7 @@ function TocProgress({
|
|
|
98
98
|
"%)"
|
|
99
99
|
] })
|
|
100
100
|
] }),
|
|
101
|
-
/* @__PURE__ */ jsx("div", { className: "mt-2 h-2 rounded-full bg-
|
|
101
|
+
/* @__PURE__ */ jsx("div", { className: "mt-2 h-2 rounded-full bg-secondary", children: /* @__PURE__ */ jsx(
|
|
102
102
|
"div",
|
|
103
103
|
{
|
|
104
104
|
className: "h-full rounded-full bg-primary transition-all duration-300",
|
|
@@ -122,7 +122,7 @@ function TocSectionList({
|
|
|
122
122
|
{
|
|
123
123
|
className: cn(
|
|
124
124
|
"flex w-full items-center gap-3 rounded-md px-3 py-2 text-left text-sm transition-colors",
|
|
125
|
-
isCurrent ? "bg-primary/10 text-primary font-medium" : "hover:bg-
|
|
125
|
+
isCurrent ? "bg-primary/10 text-primary font-medium" : "hover:bg-secondary text-foreground"
|
|
126
126
|
),
|
|
127
127
|
onClick: () => {
|
|
128
128
|
onSelectSection(index);
|
|
@@ -29,7 +29,7 @@ const tabsTriggerVariants = cva(
|
|
|
29
29
|
variants: {
|
|
30
30
|
variant: {
|
|
31
31
|
link: "underline-offset-4 data-[state=active]:text-foreground data-[state=active]:underline data-[state=inactive]:text-muted-foreground data-[state=inactive]:hover:text-foreground data-[state=inactive]:hover:underline",
|
|
32
|
-
pill: "rounded-full data-[state=active]:bg-
|
|
32
|
+
pill: "rounded-full data-[state=active]:bg-secondary data-[state=active]:text-foreground data-[state=inactive]:text-muted-foreground data-[state=inactive]:hover:bg-secondary/50 data-[state=inactive]:hover:text-foreground",
|
|
33
33
|
underline: "-mb-px border-b-2 data-[state=active]:border-primary data-[state=active]:text-primary data-[state=inactive]:border-transparent data-[state=inactive]:text-muted-foreground data-[state=inactive]:hover:border-muted-foreground/50 data-[state=inactive]:hover:text-foreground"
|
|
34
34
|
}
|
|
35
35
|
}
|
|
@@ -51,7 +51,7 @@ const ThreadBubble = ({
|
|
|
51
51
|
onResolve ? /* @__PURE__ */ jsx(
|
|
52
52
|
"button",
|
|
53
53
|
{
|
|
54
|
-
className: "rounded-full border border-border px-2 py-0.5 text-[10px] font-medium text-muted-foreground transition-colors hover:bg-
|
|
54
|
+
className: "rounded-full border border-border px-2 py-0.5 text-[10px] font-medium text-muted-foreground transition-colors hover:bg-secondary/40 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring",
|
|
55
55
|
"data-thread-bubble-resolve": true,
|
|
56
56
|
onClick: handleResolve,
|
|
57
57
|
type: "button",
|
|
@@ -43,7 +43,7 @@ const Track = (props) => /* @__PURE__ */ jsxs("div", { className: "relative h-6"
|
|
|
43
43
|
"span",
|
|
44
44
|
{
|
|
45
45
|
"aria-hidden": "true",
|
|
46
|
-
className: "absolute left-0 right-0 top-1/2 h-1 -translate-y-1/2 rounded-full bg-
|
|
46
|
+
className: "absolute left-0 right-0 top-1/2 h-1 -translate-y-1/2 rounded-full bg-secondary"
|
|
47
47
|
}
|
|
48
48
|
),
|
|
49
49
|
/* @__PURE__ */ jsx(
|
|
@@ -46,7 +46,7 @@ function TLDRSection({ children, label }) {
|
|
|
46
46
|
{
|
|
47
47
|
"aria-controls": isExpanded ? regionId : void 0,
|
|
48
48
|
"aria-expanded": isExpanded,
|
|
49
|
-
className: "flex items-center justify-between w-full px-4 py-3 hover:bg-
|
|
49
|
+
className: "flex items-center justify-between w-full px-4 py-3 hover:bg-secondary/50 transition-colors",
|
|
50
50
|
onClick: () => {
|
|
51
51
|
setIsExpanded(!isExpanded);
|
|
52
52
|
},
|
|
@@ -99,10 +99,10 @@ function TLDRSection({ children, label }) {
|
|
|
99
99
|
}
|
|
100
100
|
),
|
|
101
101
|
isExpanded ? /* @__PURE__ */ jsx("div", { className: "px-4 pb-4 pt-2 border-t border-border", id: regionId, children: showSkeleton ? /* @__PURE__ */ jsxs("div", { className: "space-y-3", children: [
|
|
102
|
-
/* @__PURE__ */ jsx("div", { className: "relative h-4 bg-
|
|
103
|
-
/* @__PURE__ */ jsx("div", { className: "relative h-4 bg-
|
|
104
|
-
/* @__PURE__ */ jsx("div", { className: "relative h-4 bg-
|
|
105
|
-
/* @__PURE__ */ jsx("div", { className: "relative h-4 bg-
|
|
102
|
+
/* @__PURE__ */ jsx("div", { className: "relative h-4 bg-secondary/50 rounded overflow-hidden", children: /* @__PURE__ */ jsx("div", { className: "absolute inset-0 bg-gradient-to-r from-transparent via-amber-400/40 to-transparent animate-shimmer motion-reduce:animate-none" }) }),
|
|
103
|
+
/* @__PURE__ */ jsx("div", { className: "relative h-4 bg-secondary/50 rounded overflow-hidden w-5/6", children: /* @__PURE__ */ jsx("div", { className: "absolute inset-0 bg-gradient-to-r from-transparent via-amber-400/40 to-transparent animate-shimmer motion-reduce:animate-none" }) }),
|
|
104
|
+
/* @__PURE__ */ jsx("div", { className: "relative h-4 bg-secondary/50 rounded overflow-hidden w-4/5", children: /* @__PURE__ */ jsx("div", { className: "absolute inset-0 bg-gradient-to-r from-transparent via-amber-400/40 to-transparent animate-shimmer motion-reduce:animate-none" }) }),
|
|
105
|
+
/* @__PURE__ */ jsx("div", { className: "relative h-4 bg-secondary/50 rounded overflow-hidden w-3/4", children: /* @__PURE__ */ jsx("div", { className: "absolute inset-0 bg-gradient-to-r from-transparent via-amber-400/40 to-transparent animate-shimmer motion-reduce:animate-none" }) })
|
|
106
106
|
] }) : /* @__PURE__ */ jsx("div", { className: "text-sm text-muted-foreground leading-relaxed", children }) }) : null
|
|
107
107
|
] });
|
|
108
108
|
}
|