@vllnt/ui 0.2.1-canary.06f0e84 → 0.2.1-canary.0cc4e50
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 +3 -0
- package/dist/components/accordion/accordion.js +2 -2
- package/dist/components/activity-heatmap/activity-heatmap.js +17 -14
- package/dist/components/activity-log/activity-log.js +6 -6
- package/dist/components/agent-activity/agent-activity.js +8 -8
- package/dist/components/ai-artifact/ai-artifact.js +16 -16
- package/dist/components/ai-chat-input/ai-chat-input.js +3 -3
- package/dist/components/ai-message-bubble/ai-message-bubble.js +2 -2
- package/dist/components/ai-sidebar/ai-sidebar.js +8 -8
- package/dist/components/ai-source-citation/ai-source-citation.js +2 -2
- package/dist/components/ai-tool-call-display/ai-tool-call-display.js +5 -5
- package/dist/components/animated-text/animated-text.js +7 -7
- package/dist/components/annotation/annotation.js +1 -1
- package/dist/components/auto-reload/auto-reload.js +14 -4
- package/dist/components/avatar/avatar.js +1 -1
- package/dist/components/avatar-group/avatar-group.js +5 -5
- package/dist/components/banner/banner.js +3 -3
- package/dist/components/blog-card/blog-card.js +4 -2
- package/dist/components/bottom-activity-strip/bottom-activity-strip.js +3 -3
- package/dist/components/breadcrumb/breadcrumb.js +33 -26
- package/dist/components/button/button.js +1 -1
- package/dist/components/calendar/calendar.js +6 -6
- package/dist/components/callout/callout.js +1 -1
- package/dist/components/candlestick-chart/candlestick-chart.js +3 -2
- package/dist/components/canvas-shell/canvas-foundation-demo.js +5 -5
- package/dist/components/carousel/carousel.js +18 -10
- package/dist/components/category-filter/category-filter.js +1 -1
- package/dist/components/chat-dock-section/chat-dock-section.js +2 -2
- package/dist/components/checkbox/checkbox.js +2 -2
- package/dist/components/checklist/checklist.js +38 -10
- package/dist/components/checklist/index.js +8 -2
- package/dist/components/chronological-timeline/chronological-timeline.js +8 -7
- package/dist/components/civilization-card/civilization-card.js +1 -1
- package/dist/components/code-block/code-block.js +2 -2
- package/dist/components/code-playground/code-playground.js +11 -9
- package/dist/components/combobox/combobox.js +3 -8
- package/dist/components/command/command.js +1 -1
- package/dist/components/comment-pin/comment-pin.js +3 -3
- package/dist/components/comparison/comparison.js +11 -10
- package/dist/components/completion-dialog/completion-dialog.js +20 -12
- package/dist/components/connector-edge/connector-edge.js +1 -1
- package/dist/components/content-intro/content-intro.js +25 -21
- package/dist/components/context-menu/context-menu.js +4 -4
- package/dist/components/conversation-thread/conversation-thread.js +9 -9
- package/dist/components/cookie-consent/cookie-consent.js +1 -1
- package/dist/components/copy-button/copy-button.js +3 -3
- package/dist/components/countdown-timer/countdown-timer.js +9 -8
- package/dist/components/credit-badge/credit-badge.js +1 -7
- package/dist/components/curriculum/curriculum.js +10 -10
- package/dist/components/data-list/data-list.js +1 -1
- package/dist/components/data-table/data-table.js +6 -5
- package/dist/components/date-picker/date-picker.js +2 -7
- package/dist/components/dialog/dialog.js +1 -1
- package/dist/components/dropdown-menu/dropdown-menu.js +3 -3
- package/dist/components/empty-state/empty-state.js +3 -3
- package/dist/components/exercise/exercise.js +15 -7
- package/dist/components/faq/faq.js +8 -4
- package/dist/components/file-upload/file-upload.js +4 -9
- package/dist/components/filter-bar/filter-bar.js +9 -8
- package/dist/components/flashcard/flashcard.js +2 -2
- package/dist/components/floating-action-button/floating-action-button.js +1 -1
- package/dist/components/floating-toolbar/floating-toolbar.js +3 -3
- package/dist/components/flow-diagram/flow-controls.js +9 -9
- package/dist/components/flow-diagram/flow-error-boundary.js +2 -2
- package/dist/components/flow-diagram/flow-fullscreen.js +2 -2
- package/dist/components/form/form.js +1 -1
- package/dist/components/gantt-chart/gantt-chart.js +22 -19
- package/dist/components/globe-3d/globe-3d.js +16 -4
- package/dist/components/handoff-beacon/handoff-beacon.js +1 -1
- package/dist/components/historic-timeline/historic-timeline.js +2 -2
- package/dist/components/historical-figure-card/historical-figure-card.js +4 -7
- package/dist/components/horizontal-scroll-row/horizontal-scroll-row.js +6 -5
- package/dist/components/inline-input/inline-input.js +1 -1
- package/dist/components/input-otp/input-otp.js +1 -1
- package/dist/components/interactive-timeline/interactive-timeline.js +12 -9
- package/dist/components/jarvis-dock/jarvis-dock.js +4 -4
- package/dist/components/key-concept/key-concept.js +6 -5
- package/dist/components/keyboard-shortcuts-help/keyboard-shortcuts-help.js +4 -3
- package/dist/components/knowledge-check/knowledge-check.js +5 -5
- package/dist/components/lang-provider/lang-provider.js +3 -3
- package/dist/components/learning-objectives/learning-objectives.js +14 -13
- package/dist/components/live-feed/live-feed.js +17 -15
- package/dist/components/map-2d/map-2d.js +3 -3
- package/dist/components/map-timeline/map-timeline.js +5 -5
- package/dist/components/market-treemap/market-treemap.js +3 -3
- package/dist/components/mdx-content/mdx-content.js +19 -9
- package/dist/components/menubar/menubar.js +4 -4
- package/dist/components/metric-cluster/metric-cluster.js +1 -1
- package/dist/components/metric-gauge/metric-gauge.js +2 -2
- package/dist/components/model-comparison/model-comparison.js +2 -2
- package/dist/components/model-selector/model-selector.js +3 -3
- package/dist/components/multi-select/multi-select.js +4 -4
- package/dist/components/navbar-saas/navbar-saas.js +8 -7
- package/dist/components/navigation-menu/navigation-menu.js +2 -2
- package/dist/components/newsletter-signup/newsletter-signup.js +3 -3
- package/dist/components/number-input/number-input.js +2 -2
- package/dist/components/number-ticker/number-ticker.js +11 -4
- package/dist/components/object-card/object-card.js +1 -1
- package/dist/components/object-inspector/object-inspector.js +1 -1
- package/dist/components/order-book/order-book.js +2 -2
- package/dist/components/overview-board/overview-board.js +1 -1
- package/dist/components/parallel-timeline/parallel-timeline.js +2 -2
- package/dist/components/password-input/password-input.js +1 -1
- package/dist/components/plan-badge/plan-badge.js +1 -7
- package/dist/components/policy-delivery-panel/policy-delivery-panel.js +2 -2
- package/dist/components/presence-stack/presence-stack.js +2 -2
- package/dist/components/presence-sync-indicator/presence-sync-indicator.js +1 -1
- package/dist/components/pricing-table/pricing-table.js +3 -3
- package/dist/components/pro-tip/pro-tip.js +6 -6
- package/dist/components/profile-section/profile-section.js +3 -2
- package/dist/components/progress-card/progress-card.js +5 -4
- package/dist/components/progress-tracker/progress-tracker.js +24 -14
- package/dist/components/prompt-templates/prompt-templates.js +4 -4
- package/dist/components/quiz/quiz.js +7 -6
- package/dist/components/radio-group/radio-group.js +2 -2
- package/dist/components/rating/rating.js +3 -3
- package/dist/components/relationship-inspector/relationship-inspector.js +2 -2
- package/dist/components/resizable/resizable.js +1 -1
- package/dist/components/routing-assignment-panel/routing-assignment-panel.js +2 -2
- package/dist/components/run-timeline/run-timeline.js +2 -2
- package/dist/components/runtime-overview-panel/runtime-overview-panel.js +1 -1
- package/dist/components/scope-selector/scope-selector.js +8 -8
- package/dist/components/search-bar/search-bar.js +24 -2
- package/dist/components/search-dialog/search-dialog.js +484 -51
- package/dist/components/select/select.js +5 -5
- package/dist/components/selection-halo/selection-halo.js +1 -1
- package/dist/components/severity-badge/severity-badge.js +2 -2
- package/dist/components/share-dialog/share-dialog.js +2 -2
- package/dist/components/share-section/share-section.js +2 -1
- package/dist/components/sheet/sheet.js +1 -1
- package/dist/components/sidebar/sidebar.js +31 -26
- package/dist/components/sidebar-toggle/sidebar-toggle.js +3 -3
- package/dist/components/slider/slider.js +1 -1
- package/dist/components/slideshow/slideshow.js +15 -13
- package/dist/components/social-fab/social-fab.js +12 -11
- package/dist/components/sparkline-grid/sparkline-grid.js +1 -1
- package/dist/components/spinner/spinner.js +4 -4
- package/dist/components/spinner/unicode-spinner.js +4 -2
- package/dist/components/stat-card/stat-card.js +5 -5
- package/dist/components/state-badge-overlay/state-badge-overlay.js +1 -1
- package/dist/components/status-board/status-board.js +14 -7
- package/dist/components/status-indicator/status-indicator.js +3 -3
- package/dist/components/step-by-step/step-by-step.js +10 -8
- package/dist/components/step-navigation/step-navigation.js +2 -2
- package/dist/components/stepper/stepper.js +3 -3
- package/dist/components/sticky-metric/sticky-metric.js +1 -1
- package/dist/components/subscription-card/subscription-card.js +1 -1
- package/dist/components/switch/switch.js +1 -1
- package/dist/components/table-of-contents/table-of-contents.js +5 -2
- package/dist/components/table-of-contents-panel/table-of-contents-panel.js +8 -6
- package/dist/components/tabs/tabs.js +26 -8
- package/dist/components/tags-input/tags-input.js +12 -4
- package/dist/components/terminal/terminal.js +59 -37
- package/dist/components/theme-toggle/theme-toggle.js +2 -2
- package/dist/components/thinking-block/thinking-block.js +3 -3
- package/dist/components/ticker-tape/ticker-tape.js +4 -4
- package/dist/components/timeline/timeline.js +2 -2
- package/dist/components/timeline-scrubber/timeline-scrubber.js +2 -2
- package/dist/components/tldr-section/tldr-section.js +11 -9
- package/dist/components/tour/tour.js +2 -2
- package/dist/components/transaction-list/transaction-list.js +30 -9
- package/dist/components/tree-view/tree-view.js +2 -2
- package/dist/components/tutorial-card/tutorial-card.js +1 -1
- package/dist/components/tutorial-complete/tutorial-complete.js +16 -14
- package/dist/components/tutorial-filters/tutorial-filters.js +2 -2
- package/dist/components/tutorial-intro-content/tutorial-intro-content.js +5 -5
- package/dist/components/tutorial-mdx/tutorial-mdx.js +6 -6
- package/dist/components/usage-breakdown/usage-breakdown.js +10 -6
- package/dist/components/video-embed/video-embed.js +2 -2
- package/dist/components/viewport-bookmarks/viewport-bookmarks.js +3 -3
- package/dist/components/wallet-card/wallet-card.js +1 -1
- package/dist/components/watchlist/watchlist.js +7 -6
- package/dist/components/world-breadcrumbs/world-breadcrumbs.js +2 -2
- package/dist/components/world-clock-bar/world-clock-bar.js +35 -14
- package/dist/components/zoom-hud/zoom-hud.js +1 -1
- package/dist/index.d.ts +114 -30
- package/package.json +3 -3
|
@@ -64,7 +64,7 @@ function SubscriptionDetails({
|
|
|
64
64
|
/* @__PURE__ */ jsx("p", { className: "text-xs uppercase tracking-[0.18em] text-muted-foreground", children: "Monthly total" }),
|
|
65
65
|
/* @__PURE__ */ jsx("p", { className: "mt-2 text-3xl font-semibold tracking-tight", children: priceLabel })
|
|
66
66
|
] }),
|
|
67
|
-
/* @__PURE__ */ jsxs("div", { className: "space-y-3 rounded-lg border border-border/70 bg-muted/20
|
|
67
|
+
/* @__PURE__ */ jsxs("div", { className: "space-y-3 rounded-lg border border-border/70 bg-muted/20 p-4", children: [
|
|
68
68
|
/* @__PURE__ */ jsx(DetailRow, { label: "Renewal", value: renewalLabel }),
|
|
69
69
|
seatsLabel ? /* @__PURE__ */ jsx(DetailRow, { label: "Seats", value: seatsLabel }) : null,
|
|
70
70
|
usageLabel ? /* @__PURE__ */ jsx(DetailRow, { label: "Usage", value: usageLabel }) : null
|
|
@@ -16,7 +16,7 @@ const Switch = React.forwardRef(({ className, ...props }, ref) => /* @__PURE__ *
|
|
|
16
16
|
SwitchPrimitives.Thumb,
|
|
17
17
|
{
|
|
18
18
|
className: cn(
|
|
19
|
-
"pointer-events-none block
|
|
19
|
+
"pointer-events-none block size-4 rounded-full bg-background shadow-lg ring-0 transition-transform data-[state=checked]:translate-x-4 data-[state=unchecked]:translate-x-0"
|
|
20
20
|
)
|
|
21
21
|
}
|
|
22
22
|
)
|
|
@@ -41,13 +41,16 @@ function useActiveSection(sections) {
|
|
|
41
41
|
}, [sections]);
|
|
42
42
|
return activeSection;
|
|
43
43
|
}
|
|
44
|
-
function TableOfContents({
|
|
44
|
+
function TableOfContents({
|
|
45
|
+
as: Heading = "h3",
|
|
46
|
+
sections
|
|
47
|
+
}) {
|
|
45
48
|
const activeSection = useActiveSection(sections);
|
|
46
49
|
if (sections.length === 0) {
|
|
47
50
|
return null;
|
|
48
51
|
}
|
|
49
52
|
return /* @__PURE__ */ jsx("aside", { className: "hidden xl:block", children: /* @__PURE__ */ jsx("div", { className: "sticky top-8", children: /* @__PURE__ */ jsxs("div", { className: "border-l-2 border-border pl-4", children: [
|
|
50
|
-
/* @__PURE__ */ jsx(
|
|
53
|
+
/* @__PURE__ */ jsx(Heading, { className: "text-sm font-semibold mb-4 text-muted-foreground uppercase tracking-wider", children: "On This Page" }),
|
|
51
54
|
/* @__PURE__ */ jsx("nav", { className: "space-y-2", children: sections.map((section) => /* @__PURE__ */ jsx(
|
|
52
55
|
"button",
|
|
53
56
|
{
|
|
@@ -3,6 +3,7 @@ import { jsx, jsxs } from "react/jsx-runtime";
|
|
|
3
3
|
import { memo, useEffect, useRef } from "react";
|
|
4
4
|
import { cn } from "../../lib/utils";
|
|
5
5
|
function TableOfContentsPanelImpl({
|
|
6
|
+
as: Heading = "h2",
|
|
6
7
|
className,
|
|
7
8
|
closeIcon,
|
|
8
9
|
completedSections,
|
|
@@ -55,6 +56,7 @@ function TableOfContentsPanelImpl({
|
|
|
55
56
|
{
|
|
56
57
|
"aria-hidden": "true",
|
|
57
58
|
className: "absolute inset-0 bg-black/50 backdrop-blur-sm",
|
|
59
|
+
"data-testid": "toc-backdrop",
|
|
58
60
|
onClick: onClose
|
|
59
61
|
}
|
|
60
62
|
),
|
|
@@ -68,19 +70,19 @@ function TableOfContentsPanelImpl({
|
|
|
68
70
|
ref: panelRef,
|
|
69
71
|
children: /* @__PURE__ */ jsxs("div", { className: "flex h-full flex-col", children: [
|
|
70
72
|
/* @__PURE__ */ jsxs("div", { className: "flex items-center justify-between border-b border-border px-4 py-3", children: [
|
|
71
|
-
/* @__PURE__ */ jsx(
|
|
73
|
+
/* @__PURE__ */ jsx(Heading, { className: "text-lg font-semibold", id: "toc-title", children: title }),
|
|
72
74
|
/* @__PURE__ */ jsx(
|
|
73
75
|
"button",
|
|
74
76
|
{
|
|
75
77
|
"aria-label": "Close table of contents",
|
|
76
|
-
className: "flex
|
|
78
|
+
className: "flex size-8 items-center justify-center rounded-md hover:bg-muted",
|
|
77
79
|
onClick: onClose,
|
|
78
80
|
ref: closeButtonRef,
|
|
79
81
|
type: "button",
|
|
80
82
|
children: closeIcon ?? /* @__PURE__ */ jsx(
|
|
81
83
|
"svg",
|
|
82
84
|
{
|
|
83
|
-
className: "
|
|
85
|
+
className: "size-5",
|
|
84
86
|
fill: "none",
|
|
85
87
|
stroke: "currentColor",
|
|
86
88
|
viewBox: "0 0 24 24",
|
|
@@ -143,13 +145,13 @@ function TableOfContentsPanelImpl({
|
|
|
143
145
|
"span",
|
|
144
146
|
{
|
|
145
147
|
className: cn(
|
|
146
|
-
"flex
|
|
148
|
+
"flex size-5 shrink-0 items-center justify-center rounded-full border",
|
|
147
149
|
isCompleted ? "border-primary bg-primary text-primary-foreground" : "border-muted-foreground"
|
|
148
150
|
),
|
|
149
151
|
children: isCompleted ? /* @__PURE__ */ jsx(
|
|
150
152
|
"svg",
|
|
151
153
|
{
|
|
152
|
-
className: "
|
|
154
|
+
className: "size-3",
|
|
153
155
|
fill: "none",
|
|
154
156
|
stroke: "currentColor",
|
|
155
157
|
viewBox: "0 0 24 24",
|
|
@@ -175,7 +177,7 @@ function TableOfContentsPanelImpl({
|
|
|
175
177
|
)
|
|
176
178
|
]
|
|
177
179
|
}
|
|
178
|
-
) },
|
|
180
|
+
) }, section.id);
|
|
179
181
|
}) })
|
|
180
182
|
}
|
|
181
183
|
),
|
|
@@ -13,18 +13,23 @@ function useTabsContext() {
|
|
|
13
13
|
function Tabs({
|
|
14
14
|
children,
|
|
15
15
|
className,
|
|
16
|
-
defaultValue,
|
|
17
|
-
onValueChange
|
|
16
|
+
defaultValue = "",
|
|
17
|
+
onValueChange,
|
|
18
|
+
value
|
|
18
19
|
}) {
|
|
19
|
-
const [
|
|
20
|
-
const
|
|
21
|
-
|
|
22
|
-
|
|
20
|
+
const [internalTab, setInternalTab] = useState(defaultValue);
|
|
21
|
+
const isControlled = value !== void 0;
|
|
22
|
+
const activeTab = isControlled ? value : internalTab;
|
|
23
|
+
const handleSetActiveTab = (next) => {
|
|
24
|
+
if (!isControlled) {
|
|
25
|
+
setInternalTab(next);
|
|
26
|
+
}
|
|
27
|
+
onValueChange?.(next);
|
|
23
28
|
};
|
|
24
29
|
const contextValue = useMemo(
|
|
25
30
|
() => ({ activeTab, setActiveTab: handleSetActiveTab }),
|
|
26
31
|
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
27
|
-
[activeTab]
|
|
32
|
+
[activeTab, isControlled]
|
|
28
33
|
);
|
|
29
34
|
return /* @__PURE__ */ jsx(TabsContext.Provider, { value: contextValue, children: /* @__PURE__ */ jsx("div", { className: cn("my-6", className), children }) });
|
|
30
35
|
}
|
|
@@ -39,8 +44,10 @@ function TabsList({ children, className }) {
|
|
|
39
44
|
);
|
|
40
45
|
}
|
|
41
46
|
function TabsTrigger({
|
|
47
|
+
"aria-hidden": ariaHidden,
|
|
42
48
|
children,
|
|
43
49
|
className,
|
|
50
|
+
tabIndex,
|
|
44
51
|
value
|
|
45
52
|
}) {
|
|
46
53
|
const { activeTab, setActiveTab } = useTabsContext();
|
|
@@ -48,6 +55,7 @@ function TabsTrigger({
|
|
|
48
55
|
return /* @__PURE__ */ jsx(
|
|
49
56
|
"button",
|
|
50
57
|
{
|
|
58
|
+
"aria-hidden": ariaHidden,
|
|
51
59
|
"aria-selected": isActive,
|
|
52
60
|
className: cn(
|
|
53
61
|
"px-4 py-2 text-sm font-medium whitespace-nowrap transition-colors",
|
|
@@ -59,19 +67,29 @@ function TabsTrigger({
|
|
|
59
67
|
setActiveTab(value);
|
|
60
68
|
},
|
|
61
69
|
role: "tab",
|
|
70
|
+
tabIndex,
|
|
62
71
|
type: "button",
|
|
63
72
|
children
|
|
64
73
|
}
|
|
65
74
|
);
|
|
66
75
|
}
|
|
67
76
|
function TabsContent({
|
|
77
|
+
"aria-hidden": ariaHidden,
|
|
68
78
|
children,
|
|
69
79
|
className,
|
|
70
80
|
value
|
|
71
81
|
}) {
|
|
72
82
|
const { activeTab } = useTabsContext();
|
|
73
83
|
if (activeTab !== value) return null;
|
|
74
|
-
return /* @__PURE__ */ jsx(
|
|
84
|
+
return /* @__PURE__ */ jsx(
|
|
85
|
+
"div",
|
|
86
|
+
{
|
|
87
|
+
"aria-hidden": ariaHidden,
|
|
88
|
+
className: cn("pt-4", className),
|
|
89
|
+
role: "tabpanel",
|
|
90
|
+
children
|
|
91
|
+
}
|
|
92
|
+
);
|
|
75
93
|
}
|
|
76
94
|
Tabs.List = TabsList;
|
|
77
95
|
Tabs.Trigger = TabsTrigger;
|
|
@@ -7,9 +7,17 @@ function normalizeTag(tag) {
|
|
|
7
7
|
return tag.trim();
|
|
8
8
|
}
|
|
9
9
|
function getNormalizedTags(tags) {
|
|
10
|
-
return tags.
|
|
11
|
-
(
|
|
12
|
-
|
|
10
|
+
return tags.reduce(
|
|
11
|
+
(state, tag) => {
|
|
12
|
+
const normalizedTag = normalizeTag(tag);
|
|
13
|
+
if (normalizedTag.length > 0 && !state.seen.has(normalizedTag)) {
|
|
14
|
+
state.seen.add(normalizedTag);
|
|
15
|
+
state.tags.push(normalizedTag);
|
|
16
|
+
}
|
|
17
|
+
return state;
|
|
18
|
+
},
|
|
19
|
+
{ seen: /* @__PURE__ */ new Set(), tags: [] }
|
|
20
|
+
).tags;
|
|
13
21
|
}
|
|
14
22
|
function shouldAddTagFromKey(key) {
|
|
15
23
|
return key === "Enter" || key === ",";
|
|
@@ -103,7 +111,7 @@ function TagList({ disabled, onRemove, tags }) {
|
|
|
103
111
|
onRemove(tag);
|
|
104
112
|
},
|
|
105
113
|
type: "button",
|
|
106
|
-
children: /* @__PURE__ */ jsx(X, { className: "
|
|
114
|
+
children: /* @__PURE__ */ jsx(X, { className: "size-3.5" })
|
|
107
115
|
}
|
|
108
116
|
)
|
|
109
117
|
]
|
|
@@ -2,14 +2,22 @@
|
|
|
2
2
|
import { Fragment, jsx, jsxs } from "react/jsx-runtime";
|
|
3
3
|
import { useState } from "react";
|
|
4
4
|
import { Check, Copy, Terminal as TerminalIcon } from "lucide-react";
|
|
5
|
-
import { Button } from "../button";
|
|
5
|
+
import { Button } from "../button/button";
|
|
6
|
+
function getCommandContents(lines) {
|
|
7
|
+
return lines.reduce((commands, line) => {
|
|
8
|
+
if (line.type === "command") {
|
|
9
|
+
commands.push(line.content);
|
|
10
|
+
}
|
|
11
|
+
return commands;
|
|
12
|
+
}, []);
|
|
13
|
+
}
|
|
6
14
|
function Terminal({
|
|
7
15
|
copyable = true,
|
|
8
16
|
lines,
|
|
9
17
|
title = "Terminal"
|
|
10
18
|
}) {
|
|
11
19
|
const [copied, setCopied] = useState(false);
|
|
12
|
-
const commands = lines
|
|
20
|
+
const commands = getCommandContents(lines);
|
|
13
21
|
const handleCopy = async () => {
|
|
14
22
|
await navigator.clipboard.writeText(commands.join("\n"));
|
|
15
23
|
setCopied(true);
|
|
@@ -20,35 +28,42 @@ function Terminal({
|
|
|
20
28
|
return /* @__PURE__ */ jsxs("div", { className: "my-6 rounded-lg border bg-zinc-950 dark:bg-zinc-900 overflow-hidden", children: [
|
|
21
29
|
/* @__PURE__ */ jsxs("div", { className: "flex items-center justify-between px-4 py-2 bg-zinc-900 dark:bg-zinc-800 border-b border-zinc-800", children: [
|
|
22
30
|
/* @__PURE__ */ jsxs("div", { className: "flex items-center gap-2", children: [
|
|
23
|
-
/* @__PURE__ */ jsx(TerminalIcon, { className: "
|
|
31
|
+
/* @__PURE__ */ jsx(TerminalIcon, { className: "size-4 text-zinc-400" }),
|
|
24
32
|
/* @__PURE__ */ jsx("span", { className: "text-sm font-medium text-zinc-300", children: title })
|
|
25
33
|
] }),
|
|
26
34
|
/* @__PURE__ */ jsxs("div", { className: "flex items-center gap-1.5", children: [
|
|
27
|
-
/* @__PURE__ */ jsx("div", { className: "
|
|
28
|
-
/* @__PURE__ */ jsx("div", { className: "
|
|
29
|
-
/* @__PURE__ */ jsx("div", { className: "
|
|
35
|
+
/* @__PURE__ */ jsx("div", { className: "size-3 rounded-full bg-red-500" }),
|
|
36
|
+
/* @__PURE__ */ jsx("div", { className: "size-3 rounded-full bg-yellow-500" }),
|
|
37
|
+
/* @__PURE__ */ jsx("div", { className: "size-3 rounded-full bg-green-500" })
|
|
30
38
|
] })
|
|
31
39
|
] }),
|
|
32
40
|
/* @__PURE__ */ jsxs("div", { className: "relative", children: [
|
|
33
|
-
/* @__PURE__ */ jsx("div", { className: "p-4 font-mono text-sm space-y-1 overflow-x-auto", children: lines.map((line
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
41
|
+
/* @__PURE__ */ jsx("div", { className: "p-4 font-mono text-sm space-y-1 overflow-x-auto", children: lines.map((line) => /* @__PURE__ */ jsxs(
|
|
42
|
+
"div",
|
|
43
|
+
{
|
|
44
|
+
className: "flex items-start",
|
|
45
|
+
children: [
|
|
46
|
+
line.type === "command" && /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
47
|
+
/* @__PURE__ */ jsx("span", { className: "text-green-400 mr-2 select-none", children: "$" }),
|
|
48
|
+
/* @__PURE__ */ jsx("span", { className: "text-zinc-100", children: line.content })
|
|
49
|
+
] }),
|
|
50
|
+
line.type === "output" && /* @__PURE__ */ jsx("span", { className: "text-zinc-400", children: line.content }),
|
|
51
|
+
line.type === "comment" && /* @__PURE__ */ jsxs("span", { className: "text-zinc-600 italic", children: [
|
|
52
|
+
"# ",
|
|
53
|
+
line.content
|
|
54
|
+
] })
|
|
55
|
+
]
|
|
56
|
+
},
|
|
57
|
+
`${line.type}-${line.content}`
|
|
58
|
+
)) }),
|
|
44
59
|
copyable && commands.length > 0 ? /* @__PURE__ */ jsx(
|
|
45
60
|
Button,
|
|
46
61
|
{
|
|
47
|
-
className: "absolute top-2 right-2
|
|
62
|
+
className: "absolute top-2 right-2 size-8 bg-zinc-800 hover:bg-zinc-700 text-zinc-300",
|
|
48
63
|
onClick: handleCopy,
|
|
49
64
|
size: "icon",
|
|
50
65
|
variant: "ghost",
|
|
51
|
-
children: copied ? /* @__PURE__ */ jsx(Check, { className: "
|
|
66
|
+
children: copied ? /* @__PURE__ */ jsx(Check, { className: "size-3" }) : /* @__PURE__ */ jsx(Copy, { className: "size-3" })
|
|
52
67
|
}
|
|
53
68
|
) : null
|
|
54
69
|
] })
|
|
@@ -68,7 +83,7 @@ function SimpleTerminal({
|
|
|
68
83
|
}
|
|
69
84
|
return { content: line, type: "output" };
|
|
70
85
|
});
|
|
71
|
-
const commands = lines
|
|
86
|
+
const commands = getCommandContents(lines);
|
|
72
87
|
const handleCopy = async () => {
|
|
73
88
|
await navigator.clipboard.writeText(commands.join("\n"));
|
|
74
89
|
setCopied(true);
|
|
@@ -79,35 +94,42 @@ function SimpleTerminal({
|
|
|
79
94
|
return /* @__PURE__ */ jsxs("div", { className: "my-6 rounded-lg border bg-zinc-950 dark:bg-zinc-900 overflow-hidden", children: [
|
|
80
95
|
/* @__PURE__ */ jsxs("div", { className: "flex items-center justify-between px-4 py-2 bg-zinc-900 dark:bg-zinc-800 border-b border-zinc-800", children: [
|
|
81
96
|
/* @__PURE__ */ jsxs("div", { className: "flex items-center gap-2", children: [
|
|
82
|
-
/* @__PURE__ */ jsx(TerminalIcon, { className: "
|
|
97
|
+
/* @__PURE__ */ jsx(TerminalIcon, { className: "size-4 text-zinc-400" }),
|
|
83
98
|
/* @__PURE__ */ jsx("span", { className: "text-sm font-medium text-zinc-300", children: title })
|
|
84
99
|
] }),
|
|
85
100
|
/* @__PURE__ */ jsxs("div", { className: "flex items-center gap-1.5", children: [
|
|
86
|
-
/* @__PURE__ */ jsx("div", { className: "
|
|
87
|
-
/* @__PURE__ */ jsx("div", { className: "
|
|
88
|
-
/* @__PURE__ */ jsx("div", { className: "
|
|
101
|
+
/* @__PURE__ */ jsx("div", { className: "size-3 rounded-full bg-red-500" }),
|
|
102
|
+
/* @__PURE__ */ jsx("div", { className: "size-3 rounded-full bg-yellow-500" }),
|
|
103
|
+
/* @__PURE__ */ jsx("div", { className: "size-3 rounded-full bg-green-500" })
|
|
89
104
|
] })
|
|
90
105
|
] }),
|
|
91
106
|
/* @__PURE__ */ jsxs("div", { className: "relative", children: [
|
|
92
|
-
/* @__PURE__ */ jsx("div", { className: "p-4 font-mono text-sm space-y-1 overflow-x-auto", children: lines.map((line
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
107
|
+
/* @__PURE__ */ jsx("div", { className: "p-4 font-mono text-sm space-y-1 overflow-x-auto", children: lines.map((line) => /* @__PURE__ */ jsxs(
|
|
108
|
+
"div",
|
|
109
|
+
{
|
|
110
|
+
className: "flex items-start",
|
|
111
|
+
children: [
|
|
112
|
+
line.type === "command" && /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
113
|
+
/* @__PURE__ */ jsx("span", { className: "text-green-400 mr-2 select-none", children: "$" }),
|
|
114
|
+
/* @__PURE__ */ jsx("span", { className: "text-zinc-100", children: line.content })
|
|
115
|
+
] }),
|
|
116
|
+
line.type === "output" && /* @__PURE__ */ jsx("span", { className: "text-zinc-400", children: line.content }),
|
|
117
|
+
line.type === "comment" && /* @__PURE__ */ jsxs("span", { className: "text-zinc-600 italic", children: [
|
|
118
|
+
"# ",
|
|
119
|
+
line.content
|
|
120
|
+
] })
|
|
121
|
+
]
|
|
122
|
+
},
|
|
123
|
+
`${line.type}-${line.content}`
|
|
124
|
+
)) }),
|
|
103
125
|
commands.length > 0 && /* @__PURE__ */ jsx(
|
|
104
126
|
Button,
|
|
105
127
|
{
|
|
106
|
-
className: "absolute top-2 right-2
|
|
128
|
+
className: "absolute top-2 right-2 size-8 bg-zinc-800 hover:bg-zinc-700 text-zinc-300",
|
|
107
129
|
onClick: handleCopy,
|
|
108
130
|
size: "icon",
|
|
109
131
|
variant: "ghost",
|
|
110
|
-
children: copied ? /* @__PURE__ */ jsx(Check, { className: "
|
|
132
|
+
children: copied ? /* @__PURE__ */ jsx(Check, { className: "size-3" }) : /* @__PURE__ */ jsx(Copy, { className: "size-3" })
|
|
111
133
|
}
|
|
112
134
|
)
|
|
113
135
|
] })
|
|
@@ -20,7 +20,7 @@ function ThemeButton({
|
|
|
20
20
|
Button,
|
|
21
21
|
{
|
|
22
22
|
"aria-label": ariaLabel,
|
|
23
|
-
className: "bg-background text-foreground border border-
|
|
23
|
+
className: "bg-background text-foreground border border-zinc-300 dark:border-zinc-600 hover:border-zinc-400 dark:hover:border-zinc-500 transition-colors",
|
|
24
24
|
size: "icon",
|
|
25
25
|
variant: "outline",
|
|
26
26
|
...props,
|
|
@@ -120,7 +120,7 @@ function ThemeToggle({ dict }) {
|
|
|
120
120
|
DropdownMenuContent,
|
|
121
121
|
{
|
|
122
122
|
align: "end",
|
|
123
|
-
className: "bg-background border border-
|
|
123
|
+
className: "bg-background border border-zinc-300 dark:border-zinc-600",
|
|
124
124
|
onMouseEnter: () => {
|
|
125
125
|
isHoveringOverMenuAreaReference.current = true;
|
|
126
126
|
clearCloseTimer();
|
|
@@ -30,10 +30,10 @@ function ThinkingBlock({
|
|
|
30
30
|
onClick: toggleExpanded,
|
|
31
31
|
type: "button",
|
|
32
32
|
children: [
|
|
33
|
-
isExpanded ? /* @__PURE__ */ jsx(ChevronDown, { className: "
|
|
33
|
+
isExpanded ? /* @__PURE__ */ jsx(ChevronDown, { className: "size-3" }) : /* @__PURE__ */ jsx(ChevronRight, { className: "size-3" }),
|
|
34
34
|
/* @__PURE__ */ jsxs("span", { children: [
|
|
35
35
|
"Thinking",
|
|
36
|
-
isStreaming ? /* @__PURE__ */ jsx("span", { className: "ml-1 animate-pulse", children: "
|
|
36
|
+
isStreaming ? /* @__PURE__ */ jsx("span", { className: "ml-1 animate-pulse", children: "\u2026" }) : null
|
|
37
37
|
] })
|
|
38
38
|
]
|
|
39
39
|
}
|
|
@@ -41,7 +41,7 @@ function ThinkingBlock({
|
|
|
41
41
|
isExpanded ? /* @__PURE__ */ jsxs(
|
|
42
42
|
"div",
|
|
43
43
|
{
|
|
44
|
-
className: "mt-2 p-3 bg-muted/50 rounded text-xs text-muted-foreground whitespace-pre-wrap border-l
|
|
44
|
+
className: "mt-2 p-3 bg-muted/50 rounded text-xs text-muted-foreground whitespace-pre-wrap border-l border-muted-foreground/30 max-h-48 overflow-y-auto",
|
|
45
45
|
id: contentId,
|
|
46
46
|
children: [
|
|
47
47
|
thinking,
|
|
@@ -2,7 +2,7 @@ import { jsx, jsxs } from "react/jsx-runtime";
|
|
|
2
2
|
import * as React from "react";
|
|
3
3
|
import { ArrowDownRight, ArrowUpRight, Dot } from "lucide-react";
|
|
4
4
|
import { cn } from "../../lib/utils";
|
|
5
|
-
import { Badge } from "../badge";
|
|
5
|
+
import { Badge } from "../badge/badge";
|
|
6
6
|
const tickerTapeKeyframes = `
|
|
7
7
|
@keyframes ticker-tape-scroll {
|
|
8
8
|
from {
|
|
@@ -22,7 +22,7 @@ function formatChange(change) {
|
|
|
22
22
|
return `${sign}${change.toFixed(2)}%`;
|
|
23
23
|
}
|
|
24
24
|
function TickerTapeRow({ items }) {
|
|
25
|
-
return /* @__PURE__ */ jsx("div", { className: "flex min-w-max items-center gap-3
|
|
25
|
+
return /* @__PURE__ */ jsx("div", { className: "flex min-w-max items-center gap-3 p-3", children: items.map((item) => {
|
|
26
26
|
const isPositive = item.change >= 0;
|
|
27
27
|
const TrendIcon = isPositive ? ArrowUpRight : ArrowDownRight;
|
|
28
28
|
return /* @__PURE__ */ jsxs(
|
|
@@ -43,13 +43,13 @@ function TickerTapeRow({ items }) {
|
|
|
43
43
|
),
|
|
44
44
|
variant: "outline",
|
|
45
45
|
children: [
|
|
46
|
-
/* @__PURE__ */ jsx(TrendIcon, { className: "
|
|
46
|
+
/* @__PURE__ */ jsx(TrendIcon, { className: "size-3" }),
|
|
47
47
|
formatChange(item.change)
|
|
48
48
|
]
|
|
49
49
|
}
|
|
50
50
|
),
|
|
51
51
|
item.volume ? /* @__PURE__ */ jsxs("span", { className: "hidden items-center text-xs text-muted-foreground sm:inline-flex", children: [
|
|
52
|
-
/* @__PURE__ */ jsx(Dot, { className: "
|
|
52
|
+
/* @__PURE__ */ jsx(Dot, { className: "size-3.5" }),
|
|
53
53
|
item.volume
|
|
54
54
|
] }) : null
|
|
55
55
|
]
|
|
@@ -102,7 +102,7 @@ function Marker({ color, icon, status }) {
|
|
|
102
102
|
{
|
|
103
103
|
"aria-hidden": "true",
|
|
104
104
|
className: cn(
|
|
105
|
-
"relative z-10 flex
|
|
105
|
+
"relative z-10 flex size-6 shrink-0 items-center justify-center rounded-full border-2 bg-background text-[10px]",
|
|
106
106
|
borderClass
|
|
107
107
|
),
|
|
108
108
|
children: icon ? /* @__PURE__ */ jsx(
|
|
@@ -118,7 +118,7 @@ function Marker({ color, icon, status }) {
|
|
|
118
118
|
"span",
|
|
119
119
|
{
|
|
120
120
|
className: cn(
|
|
121
|
-
"
|
|
121
|
+
"size-2.5 rounded-full",
|
|
122
122
|
override ? fillClass : palette.markerFill
|
|
123
123
|
)
|
|
124
124
|
}
|
|
@@ -125,7 +125,7 @@ const TimelineScrubber = forwardRef((props, ref) => {
|
|
|
125
125
|
const span = safeEnd - start;
|
|
126
126
|
const clamped = clamp(value, start, safeEnd);
|
|
127
127
|
const ratio = clamp((clamped - start) / span, 0, 1);
|
|
128
|
-
const
|
|
128
|
+
const handleScrubberValueChange = (event) => {
|
|
129
129
|
onValueChange(clamp(Number(event.target.value), start, safeEnd));
|
|
130
130
|
};
|
|
131
131
|
return /* @__PURE__ */ jsxs(
|
|
@@ -158,7 +158,7 @@ const TimelineScrubber = forwardRef((props, ref) => {
|
|
|
158
158
|
inputId,
|
|
159
159
|
max: safeEnd,
|
|
160
160
|
min: start,
|
|
161
|
-
onChange:
|
|
161
|
+
onChange: handleScrubberValueChange,
|
|
162
162
|
ratio,
|
|
163
163
|
scrubberId: inputId,
|
|
164
164
|
span,
|
|
@@ -3,20 +3,20 @@ import { jsx, jsxs } from "react/jsx-runtime";
|
|
|
3
3
|
import { useEffect, useRef, useState } from "react";
|
|
4
4
|
function TLDRSection({ children, label }) {
|
|
5
5
|
const [isExpanded, setIsExpanded] = useState(false);
|
|
6
|
-
const [
|
|
7
|
-
const
|
|
6
|
+
const [showSkeleton, setShowSkeleton] = useState(false);
|
|
7
|
+
const hasBeenOpenedRef = useRef(false);
|
|
8
8
|
const timerReference = useRef(null);
|
|
9
9
|
useEffect(() => {
|
|
10
|
-
if (isExpanded && !
|
|
10
|
+
if (isExpanded && !hasBeenOpenedRef.current) {
|
|
11
11
|
if (timerReference.current) {
|
|
12
12
|
clearTimeout(timerReference.current);
|
|
13
13
|
}
|
|
14
14
|
const rafId = requestAnimationFrame(() => {
|
|
15
|
-
|
|
16
|
-
|
|
15
|
+
setShowSkeleton(true);
|
|
16
|
+
hasBeenOpenedRef.current = true;
|
|
17
17
|
});
|
|
18
18
|
timerReference.current = setTimeout(() => {
|
|
19
|
-
|
|
19
|
+
setShowSkeleton(false);
|
|
20
20
|
timerReference.current = null;
|
|
21
21
|
}, 800);
|
|
22
22
|
return () => {
|
|
@@ -25,6 +25,7 @@ function TLDRSection({ children, label }) {
|
|
|
25
25
|
clearTimeout(timerReference.current);
|
|
26
26
|
timerReference.current = null;
|
|
27
27
|
}
|
|
28
|
+
setShowSkeleton(false);
|
|
28
29
|
};
|
|
29
30
|
}
|
|
30
31
|
return () => {
|
|
@@ -32,6 +33,7 @@ function TLDRSection({ children, label }) {
|
|
|
32
33
|
clearTimeout(timerReference.current);
|
|
33
34
|
timerReference.current = null;
|
|
34
35
|
}
|
|
36
|
+
setShowSkeleton(false);
|
|
35
37
|
};
|
|
36
38
|
}, [isExpanded]);
|
|
37
39
|
return /* @__PURE__ */ jsxs("div", { className: "my-8 rounded-lg border border-border bg-muted/30 overflow-hidden", children: [
|
|
@@ -48,7 +50,7 @@ function TLDRSection({ children, label }) {
|
|
|
48
50
|
/* @__PURE__ */ jsx(
|
|
49
51
|
"svg",
|
|
50
52
|
{
|
|
51
|
-
className: "
|
|
53
|
+
className: "size-5 text-muted-foreground",
|
|
52
54
|
fill: "none",
|
|
53
55
|
stroke: "currentColor",
|
|
54
56
|
strokeWidth: "2",
|
|
@@ -69,7 +71,7 @@ function TLDRSection({ children, label }) {
|
|
|
69
71
|
/* @__PURE__ */ jsx(
|
|
70
72
|
"svg",
|
|
71
73
|
{
|
|
72
|
-
className: `
|
|
74
|
+
className: `size-4 text-muted-foreground transition-transform ${isExpanded ? "rotate-180" : ""}`,
|
|
73
75
|
fill: "none",
|
|
74
76
|
stroke: "currentColor",
|
|
75
77
|
strokeWidth: "2",
|
|
@@ -88,7 +90,7 @@ function TLDRSection({ children, label }) {
|
|
|
88
90
|
]
|
|
89
91
|
}
|
|
90
92
|
),
|
|
91
|
-
isExpanded ? /* @__PURE__ */ jsx("div", { className: "px-4 pb-4 pt-2 border-t border-border", children:
|
|
93
|
+
isExpanded ? /* @__PURE__ */ jsx("div", { className: "px-4 pb-4 pt-2 border-t border-border", children: showSkeleton ? /* @__PURE__ */ jsxs("div", { className: "space-y-3", children: [
|
|
92
94
|
/* @__PURE__ */ jsx("div", { className: "relative h-4 bg-muted/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" }) }),
|
|
93
95
|
/* @__PURE__ */ jsx("div", { className: "relative h-4 bg-muted/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" }) }),
|
|
94
96
|
/* @__PURE__ */ jsx("div", { className: "relative h-4 bg-muted/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" }) }),
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
3
3
|
import { useState } from "react";
|
|
4
4
|
import { cn } from "../../lib/utils";
|
|
5
|
-
import { Badge } from "../badge";
|
|
5
|
+
import { Badge } from "../badge/badge";
|
|
6
6
|
import { Button } from "../button";
|
|
7
7
|
import { Card, CardContent, CardFooter, CardHeader, CardTitle } from "../card";
|
|
8
8
|
function TourHeader({
|
|
@@ -60,7 +60,7 @@ function TourFooter({
|
|
|
60
60
|
{
|
|
61
61
|
"aria-label": `Go to ${step.title}`,
|
|
62
62
|
className: cn(
|
|
63
|
-
"
|
|
63
|
+
"size-2.5 rounded-full transition-colors",
|
|
64
64
|
index === currentStep ? "bg-primary" : "bg-muted-foreground/30"
|
|
65
65
|
),
|
|
66
66
|
onClick: () => {
|
|
@@ -7,6 +7,32 @@ import { Badge } from "../badge/badge";
|
|
|
7
7
|
const CENTS_PER_UNIT = 100;
|
|
8
8
|
const DEFAULT_LOCALE = "en-US";
|
|
9
9
|
const DEFAULT_CURRENCY = "USD";
|
|
10
|
+
const CURRENCY_FORMATTER_CACHE = /* @__PURE__ */ new Map();
|
|
11
|
+
function getCurrencyFormatter(locale, currency) {
|
|
12
|
+
const key = `${locale}|${currency}`;
|
|
13
|
+
let formatter = CURRENCY_FORMATTER_CACHE.get(key);
|
|
14
|
+
if (!formatter) {
|
|
15
|
+
formatter = Intl.NumberFormat(locale, {
|
|
16
|
+
currency,
|
|
17
|
+
style: "currency"
|
|
18
|
+
});
|
|
19
|
+
CURRENCY_FORMATTER_CACHE.set(key, formatter);
|
|
20
|
+
}
|
|
21
|
+
return formatter;
|
|
22
|
+
}
|
|
23
|
+
const DATE_FORMATTER_CACHE = /* @__PURE__ */ new Map();
|
|
24
|
+
function getTransactionDateFormatter(locale) {
|
|
25
|
+
let formatter = DATE_FORMATTER_CACHE.get(locale);
|
|
26
|
+
if (!formatter) {
|
|
27
|
+
formatter = Intl.DateTimeFormat(locale, {
|
|
28
|
+
day: "numeric",
|
|
29
|
+
month: "short",
|
|
30
|
+
year: "numeric"
|
|
31
|
+
});
|
|
32
|
+
DATE_FORMATTER_CACHE.set(locale, formatter);
|
|
33
|
+
}
|
|
34
|
+
return formatter;
|
|
35
|
+
}
|
|
10
36
|
const DEFAULT_LABELS = {
|
|
11
37
|
active: "Active",
|
|
12
38
|
canceled: "Canceled",
|
|
@@ -44,17 +70,12 @@ const INTERVAL_LABEL = {
|
|
|
44
70
|
};
|
|
45
71
|
function formatTransactionAmount(amountCents, options = {}) {
|
|
46
72
|
const { currency = DEFAULT_CURRENCY, locale = DEFAULT_LOCALE } = options;
|
|
47
|
-
return
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
}).format(amountCents / CENTS_PER_UNIT);
|
|
73
|
+
return getCurrencyFormatter(locale, currency).format(
|
|
74
|
+
amountCents / CENTS_PER_UNIT
|
|
75
|
+
);
|
|
51
76
|
}
|
|
52
77
|
function formatTransactionDate(timestamp, locale = DEFAULT_LOCALE) {
|
|
53
|
-
return new
|
|
54
|
-
day: "numeric",
|
|
55
|
-
month: "short",
|
|
56
|
-
year: "numeric"
|
|
57
|
-
}).format(new Date(timestamp));
|
|
78
|
+
return getTransactionDateFormatter(locale).format(new Date(timestamp));
|
|
58
79
|
}
|
|
59
80
|
const TransactionListBase = forwardRef(
|
|
60
81
|
(props, ref) => {
|
|
@@ -92,14 +92,14 @@ function TreeRow({
|
|
|
92
92
|
{
|
|
93
93
|
"aria-hidden": "true",
|
|
94
94
|
className: cn(
|
|
95
|
-
"inline-flex
|
|
95
|
+
"inline-flex size-4 shrink-0 items-center justify-center text-xs text-muted-foreground transition-transform",
|
|
96
96
|
hasChildren ? "" : "opacity-0",
|
|
97
97
|
expanded ? "rotate-90" : ""
|
|
98
98
|
),
|
|
99
99
|
children: "\u25B8"
|
|
100
100
|
}
|
|
101
101
|
),
|
|
102
|
-
node.icon ? /* @__PURE__ */ jsx("span", { "aria-hidden": "true", className: "inline-flex
|
|
102
|
+
node.icon ? /* @__PURE__ */ jsx("span", { "aria-hidden": "true", className: "inline-flex size-4 shrink-0", children: node.icon }) : null,
|
|
103
103
|
/* @__PURE__ */ jsx("span", { className: "truncate", children: node.label })
|
|
104
104
|
]
|
|
105
105
|
}
|