@vllnt/ui 0.4.0-canary.sha7e70be6 → 0.4.0-canary.sha84d8a21
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 +117 -19
- package/README.md +35 -8
- package/dist/components/atoms/accordion/accordion.js +2 -2
- 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/badge/badge.js +84 -5
- package/dist/components/atoms/bottom-activity-strip/bottom-activity-strip.js +3 -2
- 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/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 +44 -16
- 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/segmented-control/segmented-control.js +2 -2
- package/dist/components/atoms/select/select.js +3 -3
- 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-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 +3 -2
- 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/molecules/ai-artifact/ai-artifact.js +2 -12
- 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/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 +1 -1
- 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/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/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 +222 -24
- package/dist/index.js +10 -0
- package/dist/lib/copy-text.js +64 -0
- package/dist/lib/status-dot.js +33 -0
- package/package.json +14 -3
- package/styles.css +27 -5
- package/themes/default.css +27 -5
- package/themes/presets.css +24 -24
- package/themes/products.css +11 -11
|
@@ -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
|
}
|
|
@@ -4,7 +4,7 @@ import * as TogglePrimitive from "@radix-ui/react-toggle";
|
|
|
4
4
|
import { cva } from "class-variance-authority";
|
|
5
5
|
import { cn } from "../../../lib/utils.js";
|
|
6
6
|
const toggleVariants = cva(
|
|
7
|
-
"inline-flex items-center justify-center rounded-md text-sm font-medium ring-offset-background transition-colors hover:bg-
|
|
7
|
+
"inline-flex items-center justify-center rounded-md text-sm font-medium ring-offset-background transition-colors hover:bg-secondary hover:text-muted-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 data-[state=on]:bg-accent data-[state=on]:text-accent-foreground [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0",
|
|
8
8
|
{
|
|
9
9
|
defaultVariants: {
|
|
10
10
|
size: "default",
|
|
@@ -11,7 +11,7 @@ const Row = (props) => {
|
|
|
11
11
|
onSelect?.(bookmark.id);
|
|
12
12
|
};
|
|
13
13
|
const rowClass = "flex w-full items-center gap-2 rounded-md px-2 py-1.5 text-left text-xs transition-colors";
|
|
14
|
-
const activeClass = active ? "bg-
|
|
14
|
+
const activeClass = active ? "bg-secondary/60 text-foreground" : "text-muted-foreground hover:bg-secondary/30 hover:text-foreground";
|
|
15
15
|
if (onSelect) {
|
|
16
16
|
return /* @__PURE__ */ jsx(
|
|
17
17
|
"button",
|
|
@@ -12,7 +12,7 @@ function formatPrice(price) {
|
|
|
12
12
|
function WatchlistRow({ item }) {
|
|
13
13
|
const isPositive = item.change >= 0;
|
|
14
14
|
const TrendIcon = isPositive ? ArrowUpRight : ArrowDownRight;
|
|
15
|
-
return /* @__PURE__ */ jsxs("li", { className: "grid grid-cols-[auto_minmax(0,1fr)_auto_auto] items-center gap-3 rounded-xl px-3 py-2.5 transition-colors hover:bg-
|
|
15
|
+
return /* @__PURE__ */ jsxs("li", { className: "grid grid-cols-[auto_minmax(0,1fr)_auto_auto] items-center gap-3 rounded-xl px-3 py-2.5 transition-colors hover:bg-secondary/40", children: [
|
|
16
16
|
/* @__PURE__ */ jsx(
|
|
17
17
|
"span",
|
|
18
18
|
{
|
|
@@ -51,7 +51,7 @@ const WorkspaceSwitcher = ({
|
|
|
51
51
|
"div",
|
|
52
52
|
{
|
|
53
53
|
className: cn(
|
|
54
|
-
"inline-flex min-w-0 items-center gap-1 rounded-full border border-border/70 bg-
|
|
54
|
+
"inline-flex min-w-0 items-center gap-1 rounded-full border border-border/70 bg-secondary/50 p-1",
|
|
55
55
|
className
|
|
56
56
|
),
|
|
57
57
|
onKeyDown: (event) => {
|
|
@@ -17,6 +17,7 @@ import {
|
|
|
17
17
|
Minimize2,
|
|
18
18
|
Pencil
|
|
19
19
|
} from "lucide-react";
|
|
20
|
+
import { copyText } from "../../../lib/copy-text.js";
|
|
20
21
|
import { cn } from "../../../lib/utils.js";
|
|
21
22
|
import { Badge } from "../../atoms/badge/badge.js";
|
|
22
23
|
import { Button } from "../../atoms/button/button.js";
|
|
@@ -92,17 +93,6 @@ function buildFilename({
|
|
|
92
93
|
const safeBase = slug.length > 0 ? slug : "artifact";
|
|
93
94
|
return `${safeBase}.${pickExtension(type, language)}`;
|
|
94
95
|
}
|
|
95
|
-
async function writeToClipboard(value) {
|
|
96
|
-
if (typeof navigator === "undefined" || typeof navigator.clipboard?.writeText !== "function") {
|
|
97
|
-
return false;
|
|
98
|
-
}
|
|
99
|
-
try {
|
|
100
|
-
await navigator.clipboard.writeText(value);
|
|
101
|
-
return true;
|
|
102
|
-
} catch {
|
|
103
|
-
return false;
|
|
104
|
-
}
|
|
105
|
-
}
|
|
106
96
|
function downloadValueAsFile(value, filename) {
|
|
107
97
|
if (typeof document === "undefined") return;
|
|
108
98
|
const blob = new Blob([value], { type: "text/plain;charset=utf-8" });
|
|
@@ -167,7 +157,7 @@ function useArtifactController(options) {
|
|
|
167
157
|
[filename, language, title, type]
|
|
168
158
|
);
|
|
169
159
|
const copy = useCallback(async () => {
|
|
170
|
-
const ok = await
|
|
160
|
+
const ok = await copyText(value);
|
|
171
161
|
if (!ok) return false;
|
|
172
162
|
flagCopied();
|
|
173
163
|
return true;
|
|
@@ -93,7 +93,7 @@ function EraTimeline({ era, label }) {
|
|
|
93
93
|
role: "img",
|
|
94
94
|
children: [
|
|
95
95
|
/* @__PURE__ */ jsx("span", { className: "text-xs font-medium uppercase tracking-wide text-muted-foreground", children: eraLabel }),
|
|
96
|
-
/* @__PURE__ */ jsx("div", { className: "relative h-1.5 w-full rounded-full bg-
|
|
96
|
+
/* @__PURE__ */ jsx("div", { className: "relative h-1.5 w-full rounded-full bg-secondary", children: /* @__PURE__ */ jsx(
|
|
97
97
|
"span",
|
|
98
98
|
{
|
|
99
99
|
className: "absolute h-full rounded-full bg-primary",
|
|
@@ -12,7 +12,7 @@ function DialogCloseButton({
|
|
|
12
12
|
DialogPrimitive.Close,
|
|
13
13
|
{
|
|
14
14
|
"aria-label": "Close",
|
|
15
|
-
className: "absolute right-
|
|
15
|
+
className: "absolute right-3 top-3 inline-flex min-h-6 min-w-6 items-center justify-center rounded-sm p-1 opacity-70 hover:opacity-100 transition-opacity focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring",
|
|
16
16
|
children: closeIcon ?? /* @__PURE__ */ jsx(
|
|
17
17
|
"svg",
|
|
18
18
|
{
|
|
@@ -27,7 +27,7 @@ function ContentIntroToc({
|
|
|
27
27
|
return /* @__PURE__ */ jsx("li", { children: /* @__PURE__ */ jsxs(
|
|
28
28
|
"button",
|
|
29
29
|
{
|
|
30
|
-
className: "w-full flex items-center gap-3 p-2 -m-2 rounded-lg hover:bg-
|
|
30
|
+
className: "w-full flex items-center gap-3 p-2 -m-2 rounded-lg hover:bg-secondary/50 transition-colors text-left",
|
|
31
31
|
onClick: () => {
|
|
32
32
|
onGoToSection(index);
|
|
33
33
|
},
|
|
@@ -38,7 +38,7 @@ function ContentIntroToc({
|
|
|
38
38
|
{
|
|
39
39
|
className: cn(
|
|
40
40
|
"flex-shrink-0 size-6 rounded-full flex items-center justify-center text-xs font-medium tabular-nums transition-colors",
|
|
41
|
-
isLoading && "animate-pulse bg-
|
|
41
|
+
isLoading && "animate-pulse bg-secondary motion-reduce:animate-none",
|
|
42
42
|
!isLoading && isCompleted && "bg-foreground text-background",
|
|
43
43
|
!isLoading && !isCompleted && "bg-muted"
|
|
44
44
|
),
|
|
@@ -29,7 +29,7 @@ function MessageActions({ messageId }) {
|
|
|
29
29
|
"button",
|
|
30
30
|
{
|
|
31
31
|
"aria-label": "Retry message",
|
|
32
|
-
className: "rounded p-1 text-muted-foreground transition-colors hover:bg-
|
|
32
|
+
className: "rounded p-1 text-muted-foreground transition-colors hover:bg-secondary hover:text-foreground",
|
|
33
33
|
onClick: () => {
|
|
34
34
|
onRetry(messageId);
|
|
35
35
|
},
|
|
@@ -42,7 +42,7 @@ function MessageActions({ messageId }) {
|
|
|
42
42
|
"button",
|
|
43
43
|
{
|
|
44
44
|
"aria-label": "Positive feedback",
|
|
45
|
-
className: "rounded p-1 text-muted-foreground transition-colors hover:bg-
|
|
45
|
+
className: "rounded p-1 text-muted-foreground transition-colors hover:bg-secondary hover:text-foreground",
|
|
46
46
|
onClick: () => {
|
|
47
47
|
onFeedback(messageId, "positive");
|
|
48
48
|
},
|
|
@@ -54,7 +54,7 @@ function MessageActions({ messageId }) {
|
|
|
54
54
|
"button",
|
|
55
55
|
{
|
|
56
56
|
"aria-label": "Negative feedback",
|
|
57
|
-
className: "rounded p-1 text-muted-foreground transition-colors hover:bg-
|
|
57
|
+
className: "rounded p-1 text-muted-foreground transition-colors hover:bg-secondary hover:text-foreground",
|
|
58
58
|
onClick: () => {
|
|
59
59
|
onFeedback(messageId, "negative");
|
|
60
60
|
},
|
|
@@ -290,7 +290,7 @@ const ConversationSuggestions = ({
|
|
|
290
290
|
children: suggestions.map((suggestion) => /* @__PURE__ */ jsx(
|
|
291
291
|
"button",
|
|
292
292
|
{
|
|
293
|
-
className: "rounded-full border bg-background px-4 py-2 text-sm transition-colors hover:bg-
|
|
293
|
+
className: "rounded-full border bg-background px-4 py-2 text-sm transition-colors hover:bg-secondary",
|
|
294
294
|
onClick: () => onSend?.(suggestion),
|
|
295
295
|
type: "button",
|
|
296
296
|
children: suggestion
|
|
@@ -312,7 +312,7 @@ const ConversationScrollButton = ({
|
|
|
312
312
|
{
|
|
313
313
|
"aria-label": "Scroll to bottom",
|
|
314
314
|
className: cn(
|
|
315
|
-
"absolute bottom-4 right-4 flex size-8 items-center justify-center rounded-full border bg-background shadow-md transition-colors hover:bg-
|
|
315
|
+
"absolute bottom-4 right-4 flex size-8 items-center justify-center rounded-full border bg-background shadow-md transition-colors hover:bg-secondary",
|
|
316
316
|
className
|
|
317
317
|
),
|
|
318
318
|
onClick: scrollToBottom,
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import { useCallback, useEffect, useRef, useState } from "react";
|
|
3
|
+
import { copyText } from "../../../lib/copy-text.js";
|
|
3
4
|
const FALLBACK_TIMEOUT_MS = 2e3;
|
|
4
5
|
function useCopyToClipboard(options = {}) {
|
|
5
6
|
const { timeout = FALLBACK_TIMEOUT_MS } = options;
|
|
@@ -18,20 +19,17 @@ function useCopyToClipboard(options = {}) {
|
|
|
18
19
|
}, []);
|
|
19
20
|
const copy = useCallback(
|
|
20
21
|
async (value) => {
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
await navigator.clipboard.writeText(value);
|
|
26
|
-
if (timerRef.current !== void 0) clearTimeout(timerRef.current);
|
|
27
|
-
setCopied(true);
|
|
28
|
-
timerRef.current = setTimeout(() => {
|
|
29
|
-
setCopied(false);
|
|
30
|
-
}, timeout);
|
|
31
|
-
return true;
|
|
32
|
-
} catch {
|
|
22
|
+
const ok = await copyText(value);
|
|
23
|
+
if (timerRef.current !== void 0) clearTimeout(timerRef.current);
|
|
24
|
+
if (!ok) {
|
|
25
|
+
setCopied(false);
|
|
33
26
|
return false;
|
|
34
27
|
}
|
|
28
|
+
setCopied(true);
|
|
29
|
+
timerRef.current = setTimeout(() => {
|
|
30
|
+
setCopied(false);
|
|
31
|
+
}, timeout);
|
|
32
|
+
return true;
|
|
35
33
|
},
|
|
36
34
|
[timeout]
|
|
37
35
|
);
|
|
@@ -97,7 +97,7 @@ function TimerProgress({
|
|
|
97
97
|
/* @__PURE__ */ jsx("span", { children: startedAt ? "SLA elapsed" : "Time remaining" }),
|
|
98
98
|
/* @__PURE__ */ jsx("span", { children: statusText })
|
|
99
99
|
] }),
|
|
100
|
-
/* @__PURE__ */ jsx("div", { className: "h-2 overflow-hidden rounded-full bg-
|
|
100
|
+
/* @__PURE__ */ jsx("div", { className: "h-2 overflow-hidden rounded-full bg-secondary", children: /* @__PURE__ */ jsx(
|
|
101
101
|
"div",
|
|
102
102
|
{
|
|
103
103
|
className: cn("h-full transition-all", toneClassName),
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { jsx
|
|
1
|
+
import { jsx } from "react/jsx-runtime";
|
|
2
2
|
import { cn } from "../../../lib/utils.js";
|
|
3
|
-
import {
|
|
3
|
+
import { Badge } from "../../atoms/badge/badge.js";
|
|
4
4
|
function getStatusLabel(status) {
|
|
5
5
|
switch (status) {
|
|
6
6
|
case "depleted":
|
|
@@ -13,16 +13,16 @@ function getStatusLabel(status) {
|
|
|
13
13
|
return "Balance overdue";
|
|
14
14
|
}
|
|
15
15
|
}
|
|
16
|
-
function
|
|
16
|
+
function getStatusTone(status) {
|
|
17
17
|
switch (status) {
|
|
18
18
|
case "depleted":
|
|
19
|
-
return "
|
|
19
|
+
return "neutral";
|
|
20
20
|
case "healthy":
|
|
21
|
-
return "
|
|
21
|
+
return "success";
|
|
22
22
|
case "low":
|
|
23
|
-
return "
|
|
23
|
+
return "warning";
|
|
24
24
|
case "overdue":
|
|
25
|
-
return "
|
|
25
|
+
return "danger";
|
|
26
26
|
}
|
|
27
27
|
}
|
|
28
28
|
const CreditBadge = ({
|
|
@@ -33,21 +33,18 @@ const CreditBadge = ({
|
|
|
33
33
|
status,
|
|
34
34
|
...props
|
|
35
35
|
}) => {
|
|
36
|
-
return /* @__PURE__ */
|
|
37
|
-
|
|
36
|
+
return /* @__PURE__ */ jsx(
|
|
37
|
+
Badge,
|
|
38
38
|
{
|
|
39
39
|
className: cn(
|
|
40
|
-
|
|
41
|
-
"gap-1.5 rounded-full px-2.5 py-1 text-[11px] font-medium shadow-none",
|
|
42
|
-
getStatusClasses(status),
|
|
40
|
+
"py-1 text-[11px] font-medium shadow-none hover:bg-secondary",
|
|
43
41
|
className
|
|
44
42
|
),
|
|
43
|
+
dot: true,
|
|
45
44
|
ref: reference,
|
|
45
|
+
tone: getStatusTone(status),
|
|
46
46
|
...props,
|
|
47
|
-
children:
|
|
48
|
-
/* @__PURE__ */ jsx("span", { "aria-hidden": "true", className: "size-1.5 rounded-full bg-current" }),
|
|
49
|
-
/* @__PURE__ */ jsx("span", { children: amount ? `${amount} \u2022 ${label ?? getStatusLabel(status)}` : label ?? getStatusLabel(status) })
|
|
50
|
-
]
|
|
47
|
+
children: /* @__PURE__ */ jsx("span", { children: amount ? `${amount} \u2022 ${label ?? getStatusLabel(status)}` : label ?? getStatusLabel(status) })
|
|
51
48
|
}
|
|
52
49
|
);
|
|
53
50
|
};
|
|
@@ -48,7 +48,7 @@ function DifficultyFilter({
|
|
|
48
48
|
{
|
|
49
49
|
className: cn(
|
|
50
50
|
"px-3 py-1 text-sm rounded-lg border transition-colors",
|
|
51
|
-
isActive ? "bg-primary text-primary-foreground border-transparent" : "bg-background text-foreground border-border hover:bg-
|
|
51
|
+
isActive ? "bg-primary text-primary-foreground border-transparent" : "bg-background text-foreground border-border hover:bg-secondary"
|
|
52
52
|
),
|
|
53
53
|
disabled,
|
|
54
54
|
onClick: () => {
|
|
@@ -91,7 +91,7 @@ function TagFilter({
|
|
|
91
91
|
{
|
|
92
92
|
className: cn(
|
|
93
93
|
"cursor-pointer transition-all",
|
|
94
|
-
isActive ? "bg-primary text-primary-foreground border-transparent" : "hover:bg-
|
|
94
|
+
isActive ? "bg-primary text-primary-foreground border-transparent" : "hover:bg-secondary"
|
|
95
95
|
),
|
|
96
96
|
onClick: () => {
|
|
97
97
|
onTagToggle(tag);
|
|
@@ -44,7 +44,7 @@ function LifespanBar({
|
|
|
44
44
|
"div",
|
|
45
45
|
{
|
|
46
46
|
"aria-label": `${label}: ${formatYear(birthYear) ?? ""} \u2013 ${formatYear(deathYear) ?? ""}`,
|
|
47
|
-
className: "relative mt-2 h-1.5 w-full rounded-full bg-
|
|
47
|
+
className: "relative mt-2 h-1.5 w-full rounded-full bg-secondary",
|
|
48
48
|
role: "img",
|
|
49
49
|
children: /* @__PURE__ */ jsx(
|
|
50
50
|
"span",
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
2
2
|
import { cn } from "../../../lib/utils.js";
|
|
3
|
-
import {
|
|
3
|
+
import { Badge } from "../../atoms/badge/badge.js";
|
|
4
4
|
function getPlanLabel(tier) {
|
|
5
5
|
switch (tier) {
|
|
6
6
|
case "enterprise":
|
|
@@ -13,22 +13,22 @@ function getPlanLabel(tier) {
|
|
|
13
13
|
return "Starter";
|
|
14
14
|
}
|
|
15
15
|
}
|
|
16
|
-
function
|
|
16
|
+
function getPlanTone(tier, state) {
|
|
17
17
|
if (state === "legacy") {
|
|
18
|
-
return "
|
|
18
|
+
return "warning";
|
|
19
19
|
}
|
|
20
20
|
if (state === "trial") {
|
|
21
|
-
return "
|
|
21
|
+
return "info";
|
|
22
22
|
}
|
|
23
23
|
switch (tier) {
|
|
24
24
|
case "enterprise":
|
|
25
|
-
return "
|
|
25
|
+
return "primary";
|
|
26
26
|
case "free":
|
|
27
|
-
return "
|
|
27
|
+
return "neutral";
|
|
28
28
|
case "growth":
|
|
29
|
-
return "
|
|
29
|
+
return "info";
|
|
30
30
|
case "starter":
|
|
31
|
-
return "
|
|
31
|
+
return "success";
|
|
32
32
|
}
|
|
33
33
|
}
|
|
34
34
|
const PlanBadge = ({
|
|
@@ -40,18 +40,17 @@ const PlanBadge = ({
|
|
|
40
40
|
...props
|
|
41
41
|
}) => {
|
|
42
42
|
return /* @__PURE__ */ jsxs(
|
|
43
|
-
|
|
43
|
+
Badge,
|
|
44
44
|
{
|
|
45
45
|
className: cn(
|
|
46
|
-
|
|
47
|
-
"gap-1.5 rounded-full px-2.5 py-1 text-[11px] font-medium tracking-[0.02em] shadow-none",
|
|
48
|
-
getPlanClasses(tier, state),
|
|
46
|
+
"py-1 text-[11px] font-medium tracking-[0.02em] shadow-none hover:bg-secondary",
|
|
49
47
|
className
|
|
50
48
|
),
|
|
49
|
+
dot: true,
|
|
51
50
|
ref: reference,
|
|
51
|
+
tone: getPlanTone(tier, state),
|
|
52
52
|
...props,
|
|
53
53
|
children: [
|
|
54
|
-
/* @__PURE__ */ jsx("span", { "aria-hidden": "true", className: "size-1.5 rounded-full bg-current" }),
|
|
55
54
|
/* @__PURE__ */ jsx("span", { children: label ?? getPlanLabel(tier) }),
|
|
56
55
|
state === "trial" ? /* @__PURE__ */ jsx("span", { className: "text-current/80", children: "Trial" }) : null,
|
|
57
56
|
state === "legacy" ? /* @__PURE__ */ jsx("span", { className: "text-current/80", children: "Legacy" }) : null
|
|
@@ -213,7 +213,7 @@ function PeriodToggle({
|
|
|
213
213
|
"div",
|
|
214
214
|
{
|
|
215
215
|
"aria-label": "Billing period",
|
|
216
|
-
className: "mx-auto inline-flex items-center gap-2 rounded-full border bg-
|
|
216
|
+
className: "mx-auto inline-flex items-center gap-2 rounded-full border bg-secondary/40 p-1 text-sm",
|
|
217
217
|
role: "radiogroup",
|
|
218
218
|
children: [
|
|
219
219
|
/* @__PURE__ */ jsx(
|
|
@@ -32,7 +32,7 @@ function TourHeader({
|
|
|
32
32
|
totalSteps
|
|
33
33
|
] })
|
|
34
34
|
] }),
|
|
35
|
-
/* @__PURE__ */ jsx("div", { className: "h-1 rounded-full bg-
|
|
35
|
+
/* @__PURE__ */ jsx("div", { className: "h-1 rounded-full bg-secondary", children: /* @__PURE__ */ jsx(
|
|
36
36
|
"div",
|
|
37
37
|
{
|
|
38
38
|
className: "h-full rounded-full bg-primary transition-all",
|
|
@@ -48,11 +48,11 @@ const AMOUNT_CLASS = {
|
|
|
48
48
|
negative: "text-destructive",
|
|
49
49
|
positive: "text-emerald-700 dark:text-emerald-400"
|
|
50
50
|
};
|
|
51
|
-
const
|
|
52
|
-
active: "
|
|
53
|
-
canceled: "
|
|
54
|
-
past_due: "
|
|
55
|
-
trialing: "
|
|
51
|
+
const STATUS_TONE = {
|
|
52
|
+
active: "success",
|
|
53
|
+
canceled: "neutral",
|
|
54
|
+
past_due: "danger",
|
|
55
|
+
trialing: "info"
|
|
56
56
|
};
|
|
57
57
|
const STATUS_LABEL_KEY = {
|
|
58
58
|
active: "active",
|
|
@@ -209,13 +209,11 @@ const TransactionListSubscriptionRow = ({
|
|
|
209
209
|
const resolvedLabels = { ...DEFAULT_LABELS, ...labels };
|
|
210
210
|
const formatted = formatTransactionAmount(amountCents, { currency, locale });
|
|
211
211
|
const intervalSuffix = INTERVAL_LABEL[interval];
|
|
212
|
-
const isActive = status === "active";
|
|
213
212
|
return /* @__PURE__ */ jsxs(
|
|
214
213
|
"div",
|
|
215
214
|
{
|
|
216
215
|
className: cn(
|
|
217
|
-
"flex items-start justify-between gap-3 rounded-lg border px-3 py-2",
|
|
218
|
-
isActive ? "border-emerald-500/40 bg-emerald-500/5" : "border-border bg-muted/20",
|
|
216
|
+
"flex items-start justify-between gap-3 rounded-lg border border-border bg-muted/20 px-3 py-2",
|
|
219
217
|
className
|
|
220
218
|
),
|
|
221
219
|
"data-status": status,
|
|
@@ -225,7 +223,7 @@ const TransactionListSubscriptionRow = ({
|
|
|
225
223
|
/* @__PURE__ */ jsxs("div", { className: "flex min-w-0 flex-col gap-1", children: [
|
|
226
224
|
/* @__PURE__ */ jsxs("div", { className: "flex flex-wrap items-center gap-2", children: [
|
|
227
225
|
/* @__PURE__ */ jsx("p", { className: "text-sm font-semibold text-foreground", children: plan }),
|
|
228
|
-
/* @__PURE__ */ jsx(Badge, {
|
|
226
|
+
/* @__PURE__ */ jsx(Badge, { dot: true, tone: STATUS_TONE[status], children: resolvedLabels[STATUS_LABEL_KEY[status]] })
|
|
229
227
|
] }),
|
|
230
228
|
/* @__PURE__ */ jsx(
|
|
231
229
|
SubscriptionMeta,
|
|
@@ -38,7 +38,7 @@ function DifficultyFilter({
|
|
|
38
38
|
return /* @__PURE__ */ jsx(
|
|
39
39
|
"button",
|
|
40
40
|
{
|
|
41
|
-
className: `px-3 py-1 text-sm rounded-lg border transition-colors ${isActive ? "bg-primary text-primary-foreground border-transparent" : "bg-background text-foreground border-border hover:bg-
|
|
41
|
+
className: `px-3 py-1 text-sm rounded-lg border transition-colors ${isActive ? "bg-primary text-primary-foreground border-transparent" : "bg-background text-foreground border-border hover:bg-secondary"}`,
|
|
42
42
|
disabled: isPending,
|
|
43
43
|
onClick: () => {
|
|
44
44
|
onDifficultyChange(difficulty);
|
|
@@ -79,7 +79,7 @@ function TagFilter({
|
|
|
79
79
|
return /* @__PURE__ */ jsx(
|
|
80
80
|
Badge,
|
|
81
81
|
{
|
|
82
|
-
className: `cursor-pointer transition-all ${isActive ? "bg-primary text-primary-foreground border-transparent" : "hover:bg-
|
|
82
|
+
className: `cursor-pointer transition-all ${isActive ? "bg-primary text-primary-foreground border-transparent" : "hover:bg-secondary"}`,
|
|
83
83
|
onClick: () => {
|
|
84
84
|
onTagToggle(tag);
|
|
85
85
|
},
|
|
@@ -52,7 +52,7 @@ function UsageBreakdownMeter({
|
|
|
52
52
|
value
|
|
53
53
|
}) {
|
|
54
54
|
return /* @__PURE__ */ jsxs("div", { className: "space-y-2", children: [
|
|
55
|
-
/* @__PURE__ */ jsx("div", { className: "h-2 overflow-hidden rounded-full bg-
|
|
55
|
+
/* @__PURE__ */ jsx("div", { className: "h-2 overflow-hidden rounded-full bg-secondary", children: /* @__PURE__ */ jsx(
|
|
56
56
|
"div",
|
|
57
57
|
{
|
|
58
58
|
"aria-hidden": "true",
|
|
@@ -4,7 +4,7 @@ import { cn } from "../../../lib/utils.js";
|
|
|
4
4
|
const WEEKDAY_LABELS = ["Mon", "Tue", "Wed", "Thu", "Fri", "Sat", "Sun"];
|
|
5
5
|
const VISIBLE_DAY_LABELS = /* @__PURE__ */ new Set(["Mon", "Wed", "Fri"]);
|
|
6
6
|
const LEVEL_CLASS_NAMES = [
|
|
7
|
-
"bg-
|
|
7
|
+
"bg-secondary",
|
|
8
8
|
"bg-emerald-500/25",
|
|
9
9
|
"bg-emerald-500/45",
|
|
10
10
|
"bg-emerald-500/65",
|
|
@@ -12,7 +12,7 @@ import {
|
|
|
12
12
|
X
|
|
13
13
|
} from "lucide-react";
|
|
14
14
|
import { cn } from "../../../lib/utils.js";
|
|
15
|
-
const BUTTON_CLASS = "flex size-8 items-center justify-center rounded hover:bg-
|
|
15
|
+
const BUTTON_CLASS = "flex size-8 items-center justify-center rounded hover:bg-secondary transition-colors disabled:opacity-50 disabled:cursor-not-allowed";
|
|
16
16
|
function ControlButton({
|
|
17
17
|
disabled,
|
|
18
18
|
icon,
|
|
@@ -33,7 +33,7 @@ const FlowFullscreen = memo(function FlowFullscreen2({
|
|
|
33
33
|
"button",
|
|
34
34
|
{
|
|
35
35
|
"aria-label": "Close fullscreen",
|
|
36
|
-
className: "flex size-8 items-center justify-center rounded hover:bg-
|
|
36
|
+
className: "flex size-8 items-center justify-center rounded hover:bg-secondary transition-colors",
|
|
37
37
|
onClick: onClose,
|
|
38
38
|
title: "Close fullscreen (Esc)",
|
|
39
39
|
type: "button",
|
|
@@ -20,7 +20,7 @@ const DEFAULT_LABELS = {
|
|
|
20
20
|
};
|
|
21
21
|
const EMPTY_SLIDESHOW_LABELS = {};
|
|
22
22
|
function SlideshowProgress({ progress }) {
|
|
23
|
-
return /* @__PURE__ */ jsx("div", { className: "absolute top-0 left-0 right-0 h-1 bg-
|
|
23
|
+
return /* @__PURE__ */ jsx("div", { className: "absolute top-0 left-0 right-0 h-1 bg-secondary z-10", children: /* @__PURE__ */ jsx(
|
|
24
24
|
"div",
|
|
25
25
|
{
|
|
26
26
|
className: "h-full bg-foreground transition-all duration-300 ease-out",
|
|
@@ -44,7 +44,7 @@ function SlideshowHeader({
|
|
|
44
44
|
"button",
|
|
45
45
|
{
|
|
46
46
|
"aria-label": isTocOpen ? labels.closeTocLabel : labels.openTocLabel,
|
|
47
|
-
className: "flex-shrink-0 p-2 rounded-lg hover:bg-
|
|
47
|
+
className: "flex-shrink-0 p-2 rounded-lg hover:bg-secondary transition-colors",
|
|
48
48
|
onClick: onToggleToc,
|
|
49
49
|
type: "button",
|
|
50
50
|
children: isTocOpen ? /* @__PURE__ */ jsx(
|
|
@@ -101,7 +101,7 @@ function SlideshowHeader({
|
|
|
101
101
|
"button",
|
|
102
102
|
{
|
|
103
103
|
"aria-label": labels.exitLabel,
|
|
104
|
-
className: "p-2 rounded-lg hover:bg-
|
|
104
|
+
className: "p-2 rounded-lg hover:bg-secondary transition-colors",
|
|
105
105
|
onClick: onExit,
|
|
106
106
|
type: "button",
|
|
107
107
|
children: /* @__PURE__ */ jsx(
|
|
@@ -179,7 +179,7 @@ function SlideshowToc({
|
|
|
179
179
|
"button",
|
|
180
180
|
{
|
|
181
181
|
"aria-label": labels.closeLabel,
|
|
182
|
-
className: "p-2 rounded-lg hover:bg-
|
|
182
|
+
className: "p-2 rounded-lg hover:bg-secondary transition-colors",
|
|
183
183
|
onClick: onClose,
|
|
184
184
|
type: "button",
|
|
185
185
|
children: /* @__PURE__ */ jsx(
|
|
@@ -212,7 +212,7 @@ function SlideshowToc({
|
|
|
212
212
|
{
|
|
213
213
|
className: cn(
|
|
214
214
|
"w-full flex items-center gap-3 p-3 rounded-lg text-left transition-colors",
|
|
215
|
-
isCurrent ? "bg-
|
|
215
|
+
isCurrent ? "bg-secondary" : "hover:bg-secondary/50"
|
|
216
216
|
),
|
|
217
217
|
onClick: () => {
|
|
218
218
|
onNavigate(index);
|
|
@@ -286,7 +286,7 @@ function SlideshowNav({
|
|
|
286
286
|
/* @__PURE__ */ jsxs(
|
|
287
287
|
"button",
|
|
288
288
|
{
|
|
289
|
-
className: "min-w-[100px] gap-1 inline-flex items-center justify-center px-4 py-2 rounded-md hover:bg-
|
|
289
|
+
className: "min-w-[100px] gap-1 inline-flex items-center justify-center px-4 py-2 rounded-md hover:bg-secondary transition-colors disabled:opacity-50 disabled:pointer-events-none",
|
|
290
290
|
disabled: !canGoPrevious,
|
|
291
291
|
onClick: onPrevious,
|
|
292
292
|
type: "button",
|